AffectedModuleDetector icon indicating copy to clipboard operation
AffectedModuleDetector copied to clipboard

Slashes in current branch name being replaced with backslashes on windows

Open ehrenberger-jan opened this issue 2 years ago • 1 comments

Hello. In this commit there has been an update to the RealCommandRunner#executeAndParse method, in order to map file names 'to os specific path'. Which works fine in this case, however the same method is used in CommitShaProviders to detect the current branch name. As the branch name gets replaced from i.e. feature/abc to feature\abc, the next git command - finding the commit sha - fails the execution. So this mapping to os specific path should happen depending on the use case, possibly just moved to GitClientImpl#findChangedFiles.

Thank you for looking into this.

Best regards Jan

ehrenberger-jan avatar Jul 24 '23 16:07 ehrenberger-jan

Hi @ehrenberger-jan I think you're referring to the ForkCommit and SpecifiedBranchCommitMergeBase CommitShaProviders?

Apologies I introduced the changes you're referring to but didn't test with branches that contained slashes. I also don't have a Windows machine anymore :disappointed: so can't easily reproduce. I'll see if I can create a patch for this.

mezpahlan avatar Oct 07 '23 21:10 mezpahlan

It looks like we have a PR #295 that will resolve this. Sorry about the delay

joshafeinberg avatar Aug 14 '25 18:08 joshafeinberg