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

Re: [PATCH v2] commit: run git gc --auto just before the pre-commit hook

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 28, 2018, 23:39 UTC
Message-ID
<xmqqmuzsit0c.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<20180228230425.14952-1-avarab@gmail.com>
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
Show 12 quoted lines
>> Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:
>>
>>> Change the behavior of git-commit back to what it was back in
>>> d4bb43ee27 ("Invoke "git gc --auto" from commit, merge, am and
>>> rebase.", 2007-09-05) when it was git-commit.sh.
>>
>> ... which was to run it just before post-commit.  Do I retitle this
>> patch before queuing?
>
> Do'h. Of course I screw up something simple like that, sorry. This v2
> fixes it, and I also rephrased the commit message a bit (more commas &
> full-stops).

I guess I still need to retitle it ;-) But that can happen tomorrow (I have the previous one with local fixes that pretty much matches v2 modulo the body of the log message on 'pu', ready to be pushed out).

> I wonder if it would also be a good idea to run git gc --auto on "git
> push". It itself won't create any objects, but it would be a nice
> proxy in many cases for picking up anything else we missed due to
> various object writing commands that won't run --auto.

Before "push" starts producing a pack might be a good optimization, as reading from a packed repository is often more performant than a repository full of loose objects.

Previous: Ævar Arnfjörð Bjarmason
Message 4 of 4 in “commit: run git gc --auto just before the pre-commit hook”
  1. commit: run git gc --auto just before the pre-commit hookÆvar Arnfjörð Bjarmason, Feb 28, 2018
  2. Junio C HamanoFeb 28, 2018
  3. commit: run git gc --auto just before the pre-commit hookÆvar Arnfjörð Bjarmason, Feb 28, 2018
  4. Junio C HamanoFeb 28, 2018

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.