Re: [PATCH 1/7] "git" calls help_unknown_cmd(""); "git help" and "git help -a" return 0

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

 



On Wed, Oct 24, 2007 at 09:40:55PM -0700, Junio C Hamano wrote:

> Sorry, but I fail to see why this is an improvement.
> 
> However, with the current implementation, these changes to
> help.c also make "git<Enter>" to exit with 0 after it gives
> help, which is not so nice (both "cvs" and "svn" without
> parameter seem to exit with 1 and it sort of makes sense,
> although I do not think it matters much).  As a few datapoints,
> "cvs -H" exits with 1 and "svn help" exits with 0.

That's strange because when i run that patch on my system:

  % ./git; echo $?
  git: '' is not a git-command
 
  <list of common commands>
  1
  % ./git help; echo $?
  <list of common commands>
  0
  % ./git help -a; echo $?
  <list of all commands>
  0

> So in short,
> 
>  - "git" should retain the current behaviour (both output and
>    exit code).
> 
>  - "git help" should retain the current output but probably
>    should exit with 0.
> 
>  - Ditto for "git help -a".

That's what i was hoping this patch did. I'm not entirely sure how
its wrong as it seems to work for me.

Regarding "git: '' is not a git-command" the way i was seeing that
is that git is usually only called with commands, and '' isn't a
valid command, hence the reason to exit 1, the help is just a nice
user experience.

sRp

-- 
Scott Parish
http://srparish.net/

-
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]

  Powered by Linux