Title: [Windows] Hooks for submodules that are configured outside the submodule repository lead to error in PurePath.relative_to · Issue #1999 · gitpython-developers/GitPython · GitHub
Open Graph Title: [Windows] Hooks for submodules that are configured outside the submodule repository lead to error in PurePath.relative_to · Issue #1999 · gitpython-developers/GitPython
X Title: [Windows] Hooks for submodules that are configured outside the submodule repository lead to error in PurePath.relative_to · Issue #1999 · gitpython-developers/GitPython
Description: Issue: Repo.Index.commit fails during execution of post-commit hook Root Cause: The .git config does not reside inside the submodule repository in the problematic setup. Repo/SubmoduleA$ cat .git gitdir: ../.git/modules/SubmoduleA Howeve...
Open Graph Description: Issue: Repo.Index.commit fails during execution of post-commit hook Root Cause: The .git config does not reside inside the submodule repository in the problematic setup. Repo/SubmoduleA$ cat .git g...
X Description: Issue: Repo.Index.commit fails during execution of post-commit hook Root Cause: The .git config does not reside inside the submodule repository in the problematic setup. Repo/SubmoduleA$ cat .git g...
Opengraph URL: https://github.com/gitpython-developers/GitPython/issues/1999
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Windows] Hooks for submodules that are configured outside the submodule repository lead to error in PurePath.relative_to","articleBody":"Issue: Repo.Index.commit fails during execution of post-commit hook\nRoot Cause: The .git config does not reside inside the submodule repository in the problematic setup.\n\n Repo/SubmoduleA$ cat .git\n gitdir: ../.git/modules/SubmoduleA\n\nHowever, this is expected by the commit hook on windows:\n\n if sys.platform == \"win32\" and not _has_file_extension(hp):\n # Windows only uses extensions to determine how to open files\n # (doesn't understand shebangs). Try using bash to run the hook.\n relative_hp = Path(hp).relative_to(index.repo.working_dir).as_posix()\n cmd = [\"bash.exe\", relative_hp]\n\nReproduce: Track files with git-lfs and have the hooks outside the repository directory\n\nFix:\n\n if sys.platform == \"win32\" and not _has_file_extension(hp):\n # Windows only uses extensions to determine how to open files\n # (doesn't understand shebangs). Try using bash to run the hook.\n relative_hp = Path(hp).relative_to(index.repo.working_dir, walk_up=True).as_posix()\n cmd = [\"bash.exe\", relative_hp]","author":{"url":"https://github.com/visq","@type":"Person","name":"visq"},"datePublished":"2025-01-21T16:45:24Z","url":"https://github.com/gitpython-developers/GitPython/issues/1999"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:aa5fc49d-4125-5c83-dadd-5bae74ca0f58 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AEB4:29AEE8:DEEFB7:12A1D17:6B0103D3 |
| html-safe-nonce | 916c9aafed33a555812a447aa7701791402fd9dee41507b841e4f3501c4e209e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRUI0OjI5QUVFODpERUVGQjc6MTJBMUQxNzo2QjAxMDNEMyIsInZpc2l0b3JfaWQiOiI4MDg1NTE3NTY3MDgwMzM0MjkxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4749c2a11e197d500a2c91969964eff727184c3e6d1659f1746225f7702b7bab |
| hovercard-subject-tag | issue:2802337790 |
| github-keyboard-shortcuts | repository,issues,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/issues/show/gitpython-developers/GitPython/1999/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ab3d50a5e39c28c1004c2cca70afe6b32a33e6b84e5b10361e175ac1ea83d7ca/gitpython-developers/GitPython/issues/1999 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ab3d50a5e39c28c1004c2cca70afe6b32a33e6b84e5b10361e175ac1ea83d7ca/gitpython-developers/GitPython/issues/1999 |
| og:image:alt | Issue: Repo.Index.commit fails during execution of post-commit hook Root Cause: The .git config does not reside inside the submodule repository in the problematic setup. Repo/SubmoduleA$ cat .git g... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | visq |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| 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 | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width