Skip to content

Conversation

@miguelramos
Copy link
Member

git2's index operations (add_path, remove_path) fail with error 'should not start with .'' when given paths starting with './'. This occurred during bump --execute with changeset archiving when the workspace root was '.'.

The fix normalizes relative paths in three locations:

  • cli/commands/bump/git_integration.rs: strip ./ from relative paths before staging files for commit
  • git/repo.rs: strip ./ in add() and remove() methods as defense in depth

Added comprehensive unit tests for path normalization in both crates.

…git2

git2's index operations (add_path, remove_path) fail with error 'should not
start with `.'`' when given paths starting with './'. This occurred during
bump --execute with changeset archiving when the workspace root was '.'.

The fix normalizes relative paths in three locations:
- cli/commands/bump/git_integration.rs: strip ./ from relative paths before
  staging files for commit
- git/repo.rs: strip ./ in add() and remove() methods as defense in depth

Added comprehensive unit tests for path normalization in both crates.
@miguelramos miguelramos self-assigned this Jan 14, 2026
@miguelramos miguelramos added ♨️ ACTION: pull request Pull request 🦠 TYPE: Bug Something isn't working 🩹 ACTION: fix Fixes broken behaviour labels Jan 14, 2026
@miguelramos miguelramos merged commit b8504e4 into main Jan 14, 2026
10 checks passed
@miguelramos miguelramos deleted the fix/CHANGESET-RELATIVE-PATHS branch January 14, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🩹 ACTION: fix Fixes broken behaviour ♨️ ACTION: pull request Pull request 🦠 TYPE: Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants