Repository navigation
Commit d67ffa9
Fix stale path in
`_tc_lock_fpaths` was written for a `test_repo.py` that lived two
directory levels deep under the repo root, at `git/test/test_repo.py`.
After the tests directory was moved up to `test/` in 0374d7c
(2020-07-12, "tests: move to root dir"; see also d5f0d48 for the
related revert that landed alongside it), `__file__` is one level
shallower, and the `../../.git/*.lock` glob pattern resolves to
`<parent-of-repo>/.git/*.lock` -- not the repository's own `.git/`.
That directory typically does not exist on CI runners or in normal
development setups, so `glob.glob(...)` has been returning `[]` and
`_rm_lock_files` has been a silent no-op for several years.
Change the relative-path miscount to match the current depth.
The previous commit added a regression test (now passing with this
change) that creates a `.lock` file in the repository's `.git/` and
asserts `_rm_lock_files()` removes it. That test fails without this
one-line correction.
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>_tc_lock_fpaths
1 parent 41342f0 commit d67ffa9
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments