You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(index): preserve path operands when moving and checking ignores
`IndexFile.move()` forwarded paths without an option separator in both
its preliminary dry run and its actual move. A `--force` operand could
overwrite an existing destination, and `--no-dry-run` could move files
even when the caller explicitly requested `dry_run=True`.
`Repo.ignored()` likewise interpreted leading-dash filenames as options.
Insert `--` before paths in both wrappers. The shared move argument list
protects both invocations; explicit keyword options still work. Literal
leading-dash filenames, including values containing spaces, remain usable.
Update the unreleased changelog for both APIs.
Git reference: `builtin/mv.c` and `builtin/check-ignore.c` use
`parse_options()` with `--` support at Git commit
`12cb6293d6288865c1a133cf22accbaf99d13eb6`.
Validation: all four new path regressions failed before the fix. The
positional, index, and repository suites pass 153 tests and 14 subtests,
with four skips, using test-local `init.defaultBranch=master` and
`core.quotePath=true`. One unrelated revision-parsing test was excluded:
it traverses pre-existing checkpoint refs pointing at trees. Tested with
Apple Git 2.54.0; `git diff --check` passes.
0 commit comments