Re: [PATCH] "git help" and "git help -a" shouldn't exit(1) unless they error

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Shawn O. Pearce
Date: Sunday, October 21, 2007 - 10:47 pm

Scott R Parish <srp@srparish.net> wrote:

Although it seems simple on the surface this patch breaks the
test suite:

	$ make test
	make -C t/ all
	make[1]: Entering directory `/home/spearce/mygit/t'
	*** t0000-basic.sh ***
	You do not seem to have built git yet.

The issue here is t0000-basic.sh runs "../git" and tests that the
exit status is 1.  If it isn't (the patch above makes it 0) we just
abort the test suite entirely.

I think its correct for "git help" to exit 0, and also for "git
help checkout" or "git checkout --help" to exit 0, but "git" by
itself with no subcommand should exit with an error, it requires a
subcommand to continue.  So some sort of change is needed in git.c
to handle this special no subcommand condition.
  
-- 
Shawn.
-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] "git help" and "git help -a" shouldn't exit(1) ..., Shawn O. Pearce, (Sun Oct 21, 10:47 pm)