Title: Report actual attempted Git command when Git.refresh fails by EliahKagan · Pull Request #1812 · gitpython-developers/GitPython · GitHub
Open Graph Title: Report actual attempted Git command when Git.refresh fails by EliahKagan · Pull Request #1812 · gitpython-developers/GitPython
X Title: Report actual attempted Git command when Git.refresh fails by EliahKagan · Pull Request #1812 · gitpython-developers/GitPython
Description: Fixes #1809 Fixes #1811 This modifies Git.refresh to report the attempted Git command rather than always git even if a different command was used. This affects the command attribute of the GitCommandNotFound exception, as well as (and automatically) the text displayed as cmdline: since that is from that attribute. It also expands and adds more tests of git.refesh (which calls Git.refresh) to encompass this behavior, verifying that they fail before #1809 is fixed and pass afterwards, as well as verify some behavior that was already established but not yet under test. Since #1811 would otherwise be exacerbated by these changes, I've also made it so those tests roll back the global changes they make that may affect other test by calling git.refresh() with no arguments. I believe this can be considered to fix that issue. There is a bit more information in the commit messages, including about why I've taken that approach to #1811, at least so far, rather than specifically capturing and restoring the pieces of state that are currently affected. This PR also includes some minor refactoring and comment revision for readability in some code called by git.refresh that should make no behavioral change. This includes an improvement to the wording of the comment in Git.refresh discussed in review comments on #1810; the opportunity for this came closer than I'd predicted in #1810 (comment). (It might be possible to improve it further.) Edit: Corrected "some behavior that was not established" to "some behavior that was already established but not yet under test".
Open Graph Description: Fixes #1809 Fixes #1811 This modifies Git.refresh to report the attempted Git command rather than always git even if a different command was used. This affects the command attribute of the GitComma...
X Description: Fixes #1809 Fixes #1811 This modifies Git.refresh to report the attempted Git command rather than always git even if a different command was used. This affects the command attribute of the GitComma...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1812
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/checks(.:format) |
| route-controller | pull_requests |
| route-action | checks |
| fetch-nonce | v2:671e24d7-92ee-8497-4e7b-2e0d4138854b |
| current-catalog-service-hash | 87dc3bc62d9b466312751bfd5f889726f4f1337bdff4e8be7da7c93d6c00a25a |
| request-id | BC32:19DA02:C84A02:11E86C3:696907F3 |
| html-safe-nonce | 30323d8dd1ec8f7457fc01c642e2d31faa618f1575b3a969bef87b0ef6af33b3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCQzMyOjE5REEwMjpDODRBMDI6MTFFODZDMzo2OTY5MDdGMyIsInZpc2l0b3JfaWQiOiI4OTYzOTE4NjQzNDM0NDI0MzA3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 7e745a75a80a23f922f37a1b37491145b100adfeb2702e2bdd2d4ac90a4bc6ce |
| hovercard-subject-tag | pull_request:1695213471 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,checks,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/gitpython-developers/GitPython/pull/1812/checks |
| twitter:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| og:image:alt | Fixes #1809 Fixes #1811 This modifies Git.refresh to report the attempted Git command rather than always git even if a different command was used. This affects the command attribute of the GitComma... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | e6156bd4ef9f2dc8dadf4c49a8f7ed8532186388cef72eda3ccb9f0ab3b8cfca |
| 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 full-width full-width-p-0 |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ee2210c3e58153aae53400c942f8a7b4bbb43ec4 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width