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

Re: [BUG?] gc and impatience

From
Duy Nguyen <pclouds@gmail.com>
Date
Aug 3, 2013, 03:53 UTC
Message-ID
<CACsJy8DRo9Akoydwn9-EPOSyJiPhqAf1=HncYjHvXZwS4S_d7A@mail.gmail.com>
In-Reply-To
<CALkWK0k2B5OW9zMrw0jBDDWpufojYDJybXa7jCBdzftNUc7mxA@mail.gmail.com>
On Sat, Aug 3, 2013 at 8:48 AM, Ramkumar Ramachandra <artagnon@gmail.com> wrote:
Show 6 quoted lines
>  Auto packing the repository for optimum performance. You may also
>  run "git gc" manually. See "git help gc" for more information.
>
> Being my usual impatient self, I opened another prompt and started
> merging changes. After the checkout, it started running another gc
> (why!?),

Good point. I think that is because gc does not check if gc is already running. Adding such a check should not be too hard. I think gc could save its pid in $GIT_DIR/auto-gc.pid. The next auto-gc checks this, if the pid is valid, skip auto-gc.

> Why is gc not designed for impatient people, and what needs to be done
> to change this?

Some improvements could be made in gc, for example warn users about upcoming gc so they can run it in background (of course the above bug should be fixed)

http://thread.gmane.org/gmane.comp.version-control.git/197716/focus=197877
or speed up repack by implementing pack-objects --merge-pack:
http://thread.gmane.org/gmane.comp.version-control.git/57672/focus=57943

Or you could just make a cron job to gc all repos every week and the problem goes away ;-)

-- 
Duy
Previous: Ramkumar RamachandraNext: Junio C Hamano
Message 2 of 7 in “[BUG?] gc and impatience”
  1. Ramkumar RamachandraAug 3, 2013
  2. Duy NguyenAug 3, 2013
  3. Junio C HamanoAug 3, 2013
  4. Duy NguyenAug 3, 2013
  5. Junio C HamanoAug 5, 2013
  6. Ramkumar RamachandraAug 5, 2013
  7. Ramkumar RamachandraAug 6, 2013

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.