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

2012-11-19 Thread Patrick Lehner

On Sa 17 Nov 2012 20:35:09 CET, Junio C Hamano wrote:

Patrick Lehner lehner.patr...@gmx.de writes:


But just because mv's error essage isnt very good, does that mean git
mv's error message mustn't be better?


Did I say the error message from 'mv' was not very good in the
message you are responding to (by the way, this is why you should
never top-post when you are responding to a message on this list)?

I meant to say that the message from 'mv' is good enough, so is the
one given by 'git mv'.

I wouldn't reject a patch that updates our message to something more
informative without looking at it, though.


I apologize for top-posting -- I don't usually use mailing lists and am 
not aware of the usual netiquette.


And yes, I did interpret a bit more into your reply than was there.

I wouldn't call the 'mv' error message good enough in this case, but 
very well, opinions may very well differ. Unfortunately, I have no time 
to get into the git code and contribution guidelines, so I cannot 
submit a patch myself. I would appreciate if someone else who shares my 
sentiment and knows their way around the git source a bit could find 
the time to add this :)


Regards,
Patrick
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-11-17 Thread Junio C Hamano
Patrick Lehner lehner.patr...@gmx.de writes:

 But just because mv's error essage isnt very good, does that mean git
 mv's error message mustn't be better?

Did I say the error message from 'mv' was not very good in the
message you are responding to (by the way, this is why you should
never top-post when you are responding to a message on this list)?

I meant to say that the message from 'mv' is good enough, so is the
one given by 'git mv'.

I wouldn't reject a patch that updates our message to something more
informative without looking at it, though.
--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-11-15 Thread Patrick Lehner

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 majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-11-15 Thread Junio C Hamano
Patrick Lehner lehner.patr...@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.


--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


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

2012-11-15 Thread Patrick Lehner
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.patr...@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.



--
To unsubscribe from this list: send the line unsubscribe git in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html