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

Re: [PATCH] use "git <command>" instead of "git-<command>"

From
Junio C Hamano <junkio@cox.net>
Date
Jan 25, 2006, 02:08 UTC
Message-ID
<7v64o93vq5.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060124105224.GA6765@informatik.uni-freiburg.de>
Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> writes:
> Otherwise installations with gitexecdir != bindir are not able
> to determine the right version.
True, but this part
> -VN=$(git-describe --abbrev=4 HEAD 2>/dev/null | sed -e 's/-/./g') ||
> +VN=$(git describe --abbrev=4 HEAD 2>/dev/null | sed -e 's/-/./g') ||
>...

has a subtle issue, which the commit 026351a addresses, which will hopefully become a non-issue given enough time. Then it would be safe to make this change.

Of course, if/when I change the main Makefile to have different gitexecdir and bindir by default, it would become "my problem", but until then...

> -dirty=$(sh -c 'git-diff-index --name-only HEAD' 2>/dev/null) || dirty=
> +dirty=$(sh -c 'git diff-index --name-only HEAD' 2>/dev/null) || dirty=

On the other hand, your patch is correct for this part. The issue 026351a commit addressed does not apply. An ancient 'git' that did not have 'diff-index' (it was called 'diff-cache') would have hit a breakage early on since 'describe' did not exist back then.

Previous: Uwe Zeisberger
Message 2 of 2 in “use "git <command>" instead of "git-<command>"”
  1. use "git <command>" instead of "git-<command>"Uwe Zeisberger, Jan 24, 2006
  2. Junio C HamanoJan 25, 2006

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.