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

Re: [PATCH] Invoke "gc --auto" from git commit

From
JHJean-Luc Herren <jlh@gmx.ch>
Date
Nov 26, 2008, 01:00 UTC
Message-ID
<492C9FAF.4090407@gmx.ch>
In-Reply-To
<alpine.DEB.1.00.0811260056480.30769@pacific.mpi-cbg.de>
Johannes Schindelin wrote:
> On Tue, 25 Nov 2008, Jean-Luc Herren wrote:
>> This feature was lost during the port of git commit to C.
> 
> See http://article.gmane.org/gmane.comp.version-control.git/82125

Oh, I missed that. But then the only commands ever invoking git gc --auto would be git rebase -i, git merge, git svn and git am. I don't know if some people have repositories where they never use any of those, but I certainly have repositories where I only ever use git rebase -i and never any of the other. 'git commit' is something everyone is bound to use and thus it would be the best place for running 'git gc --auto'.

As for the performance impact, on my machine 'git gc --auto' runs 500 times per second in a loop on the git repository (it won't call the hook unless repacking is necessary). I suppose any script calling git commit in a loop would do substantially more work than git gc --auto itself. And if that bit of performance really matters, it could be invoked by git commit only if (rand() % 20 == 0).

My two cents anyway.
jlh
Previous: Johannes SchindelinNext: Johannes Schindelin
Message 3 of 4 in “Invoke "gc --auto" from git commit”
  1. Invoke "gc --auto" from git commitJean-Luc Herren, Nov 25, 2008
  2. Johannes SchindelinNov 25, 2008
  3. Jean-Luc HerrenNov 26, 2008
  4. Johannes SchindelinNov 26, 2008

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.