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

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

From
Junio C Hamano <junkio@cox.net>
Date
Jan 25, 2006, 09:52 UTC
Message-ID
<7v3bjcws5o.fsf@assigned-by-dhcp.cox.net>
In-Reply-To
<20060125075635.GB2768@informatik.uni-freiburg.de>
Uwe Zeisberger <zeisberg@informatik.uni-freiburg.de> writes:
> Otherwise gitk is not able to work with installations using a gitexecdir
> different from bindir.

For something like gitk that lives for some time and spawns git number of times, it is considered a good practice to:

 (1) Run "git --exec-path" at the beginning, to learn
     GIT_EXEC_PATH;
 (2) Prepend that to PATH;
 (3) And invoke "git-foo" commands in the rest of the script.

This saves an extra fork/exec (gitk -> git -> git-foo). I was told qgit already does this.

Note that we may end up leaving some git-* commands in /usr/bin while moving the rest to elsewhere (e.g. /usr/lib/git-core/exec/), so (2) and (3) cannot be safely substituted with

 (BAD) invoke "$GIT_EXEC_PATH/git-foo" instead.

I usually prefer patches to gitk to come through paulus, so please CC: when sending patches to gitk ("git whatchanged gitk" would give you the e-mail address).

Previous: Uwe ZeisbergerNext: Uwe Zeisberger
Message 2 of 3 in “[GITK] use "git <command>" instead of "git-<command>"”
  1. [GITK] use "git <command>" instead of "git-<command>"Uwe Zeisberger, Jan 25, 2006
  2. Junio C HamanoJan 25, 2006
  3. Uwe ZeisbergerJan 26, 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.