From: Junio C Hamano <gitster@pobox.com>
To: Patrick Lehner <lehner.patrick@gmx.de>
Cc: git@vger.kernel.org
Subject: Re: `git mv` has ambiguous error message for non-existing target
Date: Thu, 15 Nov 2012 17:34:32 -0800 [thread overview]
Message-ID: <7vehju8h5j.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <50A53A80.4080203@gmx.de> (Patrick Lehner's message of "Thu, 15 Nov 2012 19:54:56 +0100")
Patrick Lehner <lehner.patrick@gmx.de> writes:
> 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.
$ rm -fr xxx
$ >yyy
$ mv yyy xxx/yyy
mv: cannot move `yyy' to `xxx/yyy': No such file or directory
It doesn't mention that the problem is with 'xxx' and not 'yyy'
either.
next prev parent reply other threads:[~2012-11-16 1:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
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=7vehju8h5j.fsf@alter.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=lehner.patrick@gmx.de \
/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).