Skip to content

fix(gcam): rebase --files paths for deleted files - #127

Merged
qiankunli merged 3 commits into
mainfrom
fix/gcam-deleted-files-rebase
Aug 5, 2026
Merged

fix(gcam): rebase --files paths for deleted files#127
qiankunli merged 3 commits into
mainfrom
fix/gcam-deleted-files-rebase

Conversation

@qiankunli

Copy link
Copy Markdown
Collaborator

normalize_files rebased explicit --files entries purely by filesystem
existence — which never fires for a deleted file (it exists at neither
the repo root nor the invoking cwd). A cwd-relative --files entry for a
deletion was passed through untouched and died as a raw pathspec error,
failing the whole batch git add and making it impossible to commit a
change set containing deletions.

Fall back to a syntactic rebase validated against git ls-files -d:
only paths git itself reports as deleted-tracked are rebased; anything
else is still left for git to report.

…list

normalize_files rebased explicit --files entries purely by filesystem
existence — which never fires for a deleted file (it exists at neither
the repo root nor the invoking cwd). A cwd-relative --files entry for a
deletion was passed through untouched and died as a raw pathspec error,
failing the whole batch `git add` and making it impossible to commit a
change set containing deletions.

Fall back to a syntactic rebase validated against `git ls-files -d`:
only paths git itself reports as deleted-tracked are rebased; anything
else is still left for git to report.
@qiankunli
qiankunli merged commit 4a62d14 into main Aug 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants