All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick Lehner <lehner.patrick@gmx.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: `git mv` has ambiguous error message for non-existing target
Date: Fri, 16 Nov 2012 08:10:10 +0100	[thread overview]
Message-ID: <50A5E6D2.5060609@gmx.de> (raw)
In-Reply-To: <7vehju8h5j.fsf@alter.siamese.dyndns.org>

But just because mv's error essage isnt very good, does that mean git 
mv's error message mustn't be better? That would strike me as an odd 
bit of reasoning.

On Fr 16 Nov 2012 02:34:32 CET, Junio C Hamano wrote:
> 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.
>
>

  reply	other threads:[~2012-11-16  7:10 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
2012-11-16  7:10   ` Patrick Lehner [this message]
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=50A5E6D2.5060609@gmx.de \
    --to=lehner.patrick@gmx.de \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.