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

Re: Forcing GC to always fail

From
Junio C Hamano <gitster@pobox.com>
Date
Nov 29, 2018, 01:19 UTC
Message-ID
<xmqqtvk0r87v.fsf@gitster-ct.c.googlers.com>
In-Reply-To
<CAGyf7-FwGRVtFYbOGW8DmY9F-cgun0n5K-ZWBjXCR=wvWh=8dQ@mail.gmail.com>
Bryan Turner <bturner@atlassian.com> writes:
Show 5 quoted lines
> For us, the biggest issue was "git gc"'s insistence on trying to run
> "git reflog expire". That triggers locking behaviors that resulted in
> very frequent GC failures--and the only reflogs Bitbucket Server (by
> default) creates are all configured to never ex[ire or be pruned, so
> the effort is all wasted anyway.

Detecting that the expiry threshold is set to "never" before spending cycles and seeks to sift between old and new and not spawning the expire command?

This seems like an obvious low-hanging fruit to me.
Show 7 quoted lines
> Another issue with the canned steps for "git gc" is that it means it
> can't be used to do specific types of cleanup on a different schedule
> from others. For example, we use "git pack-refs" directly to
> frequently pack the refs in our repositories, separate from "git
> repack" + "git prune" for repacking objects. That allows us to keep
> our refs packed better without incurring the full overhead of
> constantly building new packs.

I am not sure if the above is an example of things that are good. We keep individual "pack-refs" and "rev-list | pack-objects" available exactly to give finer grained control to repository owners, and "gc" is meant to be one-size-fits-all easy to run by end users. Adding options to "git gc --no-reflog --pack-refs" to complicate it sounds somewhat backwards.

Previous: Bryan TurnerNext: Bryan Turner
Message 7 of 8 in “Forcing GC to always fail”
  1. Bryan TurnerNov 27, 2018
  2. Ævar Arnfjörð BjarmasonNov 27, 2018
  3. Bryan TurnerNov 28, 2018
  4. Ævar Arnfjörð BjarmasonNov 28, 2018
  5. Elijah NewrenNov 28, 2018
  6. Bryan TurnerNov 28, 2018
  7. Junio C HamanoNov 29, 2018
  8. Bryan TurnerNov 29, 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.