git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Make GIT-VERSION-GEN tolerate missing git describe command

From
Linus Torvalds <torvalds@osdl.org>
Date
Dec 30, 2005, 19:55 UTC
Message-ID
<Pine.LNX.4.64.0512301153100.3249@g5.osdl.org>
In-Reply-To
<43B586B4.5030001@research.att.com>
On Fri, 30 Dec 2005, John Ellson wrote:
> 
> I checked and that bug has been fixed since the older version of git that
> was causing me problems. "git non_existent_command" now returns 1.
Ahh, good.
> However, the error message was also changed to goto stderr, which it 
> sounds like you disagree with?
Not that I can see:
	[torvalds@g5 ~]$ git --version
	git version 1.0.6-g58e3
	[torvalds@g5 ~]$ git hjsdhjas > /dev/null 
	[torvalds@g5 ~]$ echo $?
	1

so yes, it returns a proper error, and it outputs the help message to stdout, not stderr. Which is fine, because it means that you can indeed do

	git help | less
and it will do the right thing (apart from printing the line
	git: 'help' is not a git-command
which is a bit sad).
		Linus
Previous: John EllsonNext: John Ellson
Message 4 of 6 in “Make GIT-VERSION-GEN tolerate missing git describe command”
  1. Make GIT-VERSION-GEN tolerate missing git describe commandJohn Ellson, Dec 30, 2005
  2. Linus TorvaldsDec 30, 2005
  3. John EllsonDec 30, 2005
  4. Linus TorvaldsDec 30, 2005
  5. John EllsonDec 30, 2005
  6. H. Peter AnvinDec 31, 2005

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.