Title: Contributing · gitpython-developers/GitPython · Discussion #1615 · GitHub
Open Graph Title: Contributing · gitpython-developers/GitPython · Discussion #1615
X Title: Contributing · gitpython-developers/GitPython · Discussion #1615
Description: Contributing
Open Graph Description: While trying to create a PR, I got a bit confused. init-tests-after-clone.sh checks out master (not main) and then goes on to do some weird git reset --hard dance. What is that about? Do we even ne...
X Description: While trying to create a PR, I got a bit confused. init-tests-after-clone.sh checks out master (not main) and then goes on to do some weird git reset --hard dance. What is that about? Do we even ne...
Opengraph URL: https://github.com/gitpython-developers/GitPython/discussions/1615
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"QAPage","mainEntity":{"@type":"Question","name":"Contributing","text":"While trying to create a PR, I got a bit confused.
\n\ninit-tests-after-clone.sh checks out master (not main) and then goes on to do some weird git reset --hard dance. What is that about? Do we even need the master branch still or should it be deleted? \n- I am getting a lot of errors with
mypy. Most of them are in git/ext/gitdb, but there are some elsewhere also. Is this expected? \n- When running black, it also formats code in submodules and causes a lot of changes. Should we exclude those directories?
\n
\nThis is with python 3.11.3 and git 2.41.0.
","upvoteCount":1,"answerCount":1,"acceptedAnswer":{"@type":"Answer","text":"\ninit-tests-after-clone.sh checks out master (not main) and then goes on to do some weird git reset --hard dance. What is that about? Do we even need the master branch still or should it be deleted?
\n
\nThat's an interesting observation, I wasn't quite aware that master was still used there. However, and despite confusing, I think it's for the better to use a stale branch for the state used in the test suite as it is stable (now, that we have main).
\nThe init-tests-after-clone.sh was run, it should be OK to switch back to another branch. The resets are to create a ref-log history for the master branch, which hopefully is effective even if it's not checked out for the tests that care.
\n\nI am getting a lot of errors with mypy. Most of them are in git/ext/gitdb, but there are some elsewhere also. Is this expected?
\n
\nI really don't know, I don't run python or the tests locally and really don't know what's going on, what should or shouldn't be with mypy. Some contributors wanted it, and now it's there, and probably ever changing.
\n\nWhen running black, it also formats code in submodules and causes a lot of changes. Should we exclude those directories?
\n
\nI have never heard of the tool, but that means nothing. If black is the new way of doing things and tools-specific configuration would help, it could certainly be contributed.
\nThis goes, of course, for all improvements that can be done to facilitate contributions or clean things up. I can understand that this isn't always possible, and in that case recommend creating a PR with the desired change and see what CI has to say about it.
\nThanks for your understanding, I know for most questions I couldn't give an answer.
","upvoteCount":1,"url":"https://github.com/gitpython-developers/GitPython/discussions/1615#discussioncomment-6466478"}}}
| route-pattern | /_view_fragments/Voltron::DiscussionsFragmentsController/show/:user_id/:repository/:discussion_number/discussion_layout(.:format) |
| route-controller | voltron_discussions_fragments |
| route-action | discussion_layout |
| fetch-nonce | v2:813d4de7-1936-4489-ad8c-d7b3752c0550 |
| current-catalog-service-hash | 9f0abe34da433c9b6db74bffa2466494a717b579a96b30a5d252e5090baea7be |
| request-id | B46C:2A268:12D2BFE:1A39726:6968AF6E |
| html-safe-nonce | 498c1682e46b52eed204c991982dcb81be4af838a6353370cfcbdfeee11da8a2 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNDZDOjJBMjY4OjEyRDJCRkU6MUEzOTcyNjo2OTY4QUY2RSIsInZpc2l0b3JfaWQiOiI0NTIzMjM0MjAwOTgxNjQ3MjE0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bf855e9def57b679778faf548d8b030ba4a25950c7b4c4a5bde3b6cae0a68984 |
| hovercard-subject-tag | discussion:5410113 |
| github-keyboard-shortcuts | repository,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/Voltron::DiscussionsFragmentsController/show/gitpython-developers/GitPython/1615/discussion_layout |
| twitter:image | https://opengraph.githubassets.com/fe0ac6a08a647e00bca0cddc5cc537b336e0d2f1ba7f927dc72de38e51ed472b/gitpython-developers/GitPython/discussions/1615 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fe0ac6a08a647e00bca0cddc5cc537b336e0d2f1ba7f927dc72de38e51ed472b/gitpython-developers/GitPython/discussions/1615 |
| og:image:alt | While trying to create a PR, I got a bit confused. init-tests-after-clone.sh checks out master (not main) and then goes on to do some weird git reset --hard dance. What is that about? Do we even ne... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdc7c66bd36a6c12eb8e771e806db863266e573fc299e77f27505a768d4f8a98 |
| turbo-cache-control | no-preview |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3223a6503d318917691422cdadfbe16cd8fb21e5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width