From: Scott Parish Date: Thu, 25 Oct 2007 04:52:29 GMT Subject: Re: [PATCH 1/7] "git" calls help_unknown_cmd(""); "git help" and "git help -a" return 0 Message-ID: <20071025045228.GE759@srparish.net> In-Reply-To: <7vd4v33iy0.fsf@gitster.siamese.dyndns.org> 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" 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 1 % ./git help; echo $? 0 % ./git help -a; echo $? 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/