Thread (1 message) 1 message, 1 author, 2019-03-14

Misleading error message with invalid filename on Windows

From: Josh Mandel <hidden>
Date: 2019-03-14 22:31:38

Running git 2.21.0 on Windows with certain invalid file names like
"c:\root.txt" (see https://github.com/jmandel/local-path-test as a
test case), I get an expected "invalid path" error when I clone the
repository.

But if I actually have a file at this path (i.e., outside of the git
working tree, at root of my file system) then I instead receive a
different error message:

$ touch /c/root.txt
$ git clone https://github.com/jmandel/local-path-test.git
error: Untracked working tree file 'c:\root.txt' would be overwritten by merge.
This error message is misleading, in that (if I understand correctly)
there's actually no danger of my local file (which is *not* in the
working tree at all) being overwritten.

Best,
Josh
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help