Re: [PATCH] gc: introduce an --auto-exit-code option for undoing 3029970275
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Oct 10, 2018, 21:05 UTC
- Message-ID
- <87sh1declw.fsf@evledraar.gmail.com>
- In-Reply-To
- <20181010205611.GA195252@aiede.svl.corp.google.com>
On Wed, Oct 10 2018, Jonathan Nieder wrote:
Show 10 quoted lines
> Hi, > > Ævar Arnfjörð Bjarmason wrote: > >> Add an --auto-exit-code variable and a corresponding 'gc.autoExitCode' >> configuration option to optionally bring back the 'git gc --auto' exit >> code behavior as it existed between 2.6.3..2.19.0 (inclusive). > > Hm. Can you tell me more about the use case where this would be > helpful to you? That would help us come up with a better name for it.
From the E-Mail linked from the commit message[1] (I opted not to put this in, because it was getting a bit long:
Right. I know. What I mean is now I can (and do) use it to run 'git gc
--auto' across our server fleet and see whether I have any of #3, or
whether it's all #1 or #2. If there's nothing to do in #1 that's fine,
and it just so happens that I'll run gc due to #2 that's also fine, but
I'd like to see if gc really is stuck. This of course relies on them having other users / scripts doing normal
git commands which would trigger previous 'git gc --auto' runs.I.e. with your change that command:
git gc --auto
Would change to something like:
git gc --auto && ! test -e .git/gc.log
Which, as noted is a bit of a nasty breaker of the encapsulation, so now:
git gc --auto --auto-exit-code
Or just a variant of that which will have dropped the config in-place in /etc/gitconfig, and then as before:
git gc --auto
1. https://public-inbox.org/git/878t69dgvx.fsf@evledraar.gmail.com/