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

Re: [PATCH] Update "gc" behavior in commit, merge, am, rebase and index-pack

From
Nguyen Thai Ngoc Duy <pclouds@gmail.com>
Date
May 14, 2012, 09:09 UTC
Message-ID
<CACsJy8DxoRHYnBvJn7P9dS1A0Y88Bm0ur1meWCUBp09UEfuOgg@mail.gmail.com>
In-Reply-To
<alpine.LFD.2.02.1205121326380.21030@xanadu.home>
On Sun, May 13, 2012 at 12:36 AM, Nicolas Pitre <nico@fluxnic.net> wrote:
Show 23 quoted lines
> On Sat, 12 May 2012, Nguyễn Thái Ngọc Duy wrote:
>
>> A few attempts have been made in the past to change 'gc --auto' [1]
>> [2]. This is another such attempt.
>>
>> Commit d4bb43e (Invoke "git gc --auto" from commit, merge, am and
>> rebase. - 2007-09-05) used the rule to put "gc --auto" is "where
>> update-ref occurs". I would argue that this is not a good condition to
>> run gc, because (at least current) gc is slow. We encourage commit
>> often and rebase to make all patches in good shape and this workflow
>> should not be interrupted/slowed down by random "gc --auto".
>>
>> Instead, we could just inform users that "gc" should be run soon in
>> commonly used commands (this patch also reinstates "gc" check in
>> commit, which was lost at the sh->C conversion). [1] and [2] can annoy
>> users constantly with warnings. This patch shows the warning at most
>> once a day.
>
> I agree with this.  However don't bother making this once a day.  There
> is no harm in warning every time.  Referring to the man page as git
> --auto does when it actually meets its treshold wouldn't be a bad thing
> either as incidentally that would contain the info to get rid of the
> warning.

I'm good with always warning too. The moment it shows up, I can just open another terminal for "gc". Though (I guess) a new user in the middle of the work may not want to do that as they fear "gc" may interfere their work. Then the warning becomes a constant annoyance (and maybe forgotten after they're used to seeing the warning).

If everybody's good with always warning, I'll make a new patch.
-- 
Duy
Previous: Nicolas PitreNext: Sverre Rabbelier
Message 4 of 17 in “Update "gc" behavior in commit, merge, am, rebase and index-pack”
  1. Update "gc" behavior in commit, merge, am, rebase and index-packNguyễn Thái Ngọc Duy, May 12, 2012
  2. Nguyen Thai Ngoc DuyMay 12, 2012
  3. Nicolas PitreMay 12, 2012
  4. Nguyen Thai Ngoc DuyMay 14, 2012
  5. Sverre RabbelierMay 14, 2012
  6. Nguyen Thai Ngoc DuyMay 15, 2012
  7. Jeff KingMay 14, 2012
  8. Jeff KingMay 14, 2012
  9. Junio C HamanoMay 14, 2012
  10. 0/5 "git gc --auto" updateNguyễn Thái Ngọc Duy, May 16, 2012
  11. 1/5 Add convenient function to do automatic garbage collectionNguyễn Thái Ngọc Duy, May 16, 2012
  12. Junio C HamanoMay 18, 2012
  13. Nguyen Thai Ngoc DuyMay 19, 2012
  14. 2/5 index-pack: perform automatic gc, share receive.gc config with receive-packNguyễn Thái Ngọc Duy, May 16, 2012
  15. 3/5 commit: reinstate "gc --auto"Nguyễn Thái Ngọc Duy, May 16, 2012
  16. 4/5 gc: add --dry-runNguyễn Thái Ngọc Duy, May 16, 2012
  17. 5/5 Update "gc" behavior in commit, merge, am and rebaseNguyễn Thái Ngọc Duy, May 16, 2012

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.