From: Patrick Lehner <lehner.patrick@gmx.de>
To: git@vger.kernel.org
Subject: `git mv` has ambiguous error message for non-existing target
Date: Thu, 15 Nov 2012 19:54:56 +0100 [thread overview]
Message-ID: <50A53A80.4080203@gmx.de> (raw)
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
next reply other threads:[~2012-11-15 18:55 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-15 18:54 Patrick Lehner [this message]
2012-11-16 1:34 ` `git mv` has ambiguous error message for non-existing target 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=50A53A80.4080203@gmx.de \
--to=lehner.patrick@gmx.de \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).