`git mv` has ambiguous error message for non-existing target

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]