git: Worktree: Add stores index entires with backslashes on Windows by joshblum · Pull Request #2261 · go-git/go-git · GitHub
Skip to content

git: Worktree: Add stores index entires with backslashes on Windows - #2261

Closed
joshblum wants to merge 1 commit into
go-git:releases/v5.xfrom
joshblum:joshblum/to-slash
Closed

git: Worktree: Add stores index entires with backslashes on Windows#2261
joshblum wants to merge 1 commit into
go-git:releases/v5.xfrom
joshblum:joshblum/to-slash

Conversation

@joshblum

Copy link
Copy Markdown
Contributor

Assisted-by: Claude Sonnet 4.6

On Windows, Worktree.Add("dir/foo") stores the index entry as dir\foo instead of the git-canonical dir/foo. This causes subsequent Status() calls to report the file as untracked, and Checkout to misidentify it as missing.

V5 backport of #2253

@pjbgf

Signed-off-by: Joshua Blum <jblum18@gmail.com>
Assisted-by: Claude Sonnet 4.6
@joshblum

Copy link
Copy Markdown
Contributor Author

@joshblum joshblum closed this Jul 16, 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.

1 participant