git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* `git mv` has ambiguous error message for non-existing target
@ 2012-11-15 18:54 Patrick Lehner
  2012-11-16  1:34 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Patrick Lehner @ 2012-11-15 18:54 UTC (permalink / raw)
  To: git

Hey guys,

as was brought up on #github today, the "git mv" command has a bit of a 
little-helping output message when the target directory (or any 
intermediate directories) dont exist.

To reproduce:
- cd into a git repo
- assuming "filea.txt" is an existing file in the CWD, and "dirb" is 
neither a file nor a directory in the CWD, use the command "git mv 
filea.txt dirb/filea.txt"
- this will produce an error message like `fatal: renaming 'filea.sh' 
failed: No such file or directory`

It does not mention that the problem is, in fact, the target directory 
not existing. This seems to be mostly a problem for users unfamiliar 
with bash/*nix console commands. Although it is documented that git mv 
will not create intermediate folders (which is fine, because neither 
does mv), the error message might lead to believe a problem exists with 
the source file.

Expanding the error message to "No such file or directory: 'dirb/' " 
would probably clear this up.

Best regards and thanks to anyone who could improve this,
Patrick

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-11-19 21:08 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-11-15 18:54 `git mv` has ambiguous error message for non-existing target Patrick Lehner
2012-11-16  1:34 ` Junio C Hamano
2012-11-16  7:10   ` Patrick Lehner
2012-11-17 19:35     ` Junio C Hamano
2012-11-19 21:07       ` Patrick Lehner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).