git sending patches with backslash in file path from windows

12 views
Skip to first unread message

Daniel Theophanes

unread,
Nov 16, 2015, 1:02:45 PM11/16/15
to Repo and Gerrit Discussion
I'm unsure if this is a gerrit issue or git issue.

I've discovered that my windows git client is sending patches to gerrit that contain backslashes in the path:
diff --git a/internal/github.com/julienschmidt/httprouter/router.go "b/vendor\\github.com\\julienschmidt\\httprouter\\router.go"
similarity index
99%
copy
from internal/github.com/julienschmidt/httprouter/router.go
copy to
"vendor\\github.com\\julienschmidt\\httprouter\\router.go"
index
4aa2e36..3f3d163 100644
--- a/internal/github.com/julienschmidt/httprouter/router.go
+++ "b/vendor\\github.com\\julienschmidt\\httprouter\\router.go"

Then in gitiles or git the files look like
vendor\github.com\julienschmidt\httprouter\path.go
(that's a filename, not a path).

On my windows git client it appeared this worked just fine because git on windows sometimes made this work. So I didn't catch this right away. When I pulled this repo on linux I got a number of filename that were in the root directory and the *fllename* contained backslashes.

I'll figure out something to revert or alter this if I can, but any ideas of how to prevent this in the future?

Thanks, -Daniel

Reply all
Reply to author
Forward
0 new messages