Re: Is it intended behaviour that 'git gc' ignores the 'commitGraph.changedPaths' setting?
- From
Theodore Tso <tytso@mit.edu>
- Date
- Jun 4, 2026, 14:27 UTC
- Message-ID
- <zzxyeseps5rflyldmdlx54dkjlyu4v267wbpfb4xlrh4lahogf@3woimupgfm7v>
- In-Reply-To
- <aiF0aN9BwBvQffGL@pks.im>
On Thu, Jun 04, 2026 at 02:49:44PM +0200, Patrick Steinhardt wrote:
Show 5 quoted lines
> So my recommendation would be to stop using git-gc(1) altogether -- I am > biased as I have helped implementing the new maintenance strategy, but I > would say that git-gc(1) is nowadays a legacy tool that inches closer > towards the end of its life. Git's default maintenance nowadays uses > git-maintenance(1) without using git-gc(1) at all anymore.
I wonder if we should add a tunable that makes "git gc" redirect to "git maintenance run" or some such. For those of us who like to launch maintenance tasks at specific times (for example, before I disconnect from the AC mains and get on a plane), "git gc" has a major advantage --- it has fewer characters to type, and I'm lazy. :-)
The other things to perhaps suggest is ways that developers can set up rules like disabling git maintenace running while on battery, etc. This might require OS-specific mechanisms for determining whether the laptop is running on battery --- but I note that git-maintenance is already hooked into systemd and launchctl for Linux and MacOS, respectively, so there's precedent for that sort of thing.
Cheers,
- Ted