Re: [PATCH 4/7] builtin/gc: stop processing log file on signal
- From
James Liu <james@jamesliu.io>
- Date
- Aug 15, 2024, 06:01 UTC
- Message-ID
- <D3G99ASPVAJC.BIWK2TH6EIQA@jamesliu.io>
- In-Reply-To
- <812c61c9b66d7608e41c6c1d00a6e22e995cef06.1723533091.git.ps@pks.im>
On Tue Aug 13, 2024 at 5:17 PM AEST, Patrick Steinhardt wrote:
> The consequence is that "gc.log" will not be committed, and thus > subsequent calls to `git gc --auto` won't bail out because of this. > Arguably though, it is better to retry garbage collection rather than > having the process run into a potentially-corrupted state.
Ahh I see, because `report_last_gc_error()` won't have anything to read. I agree it's an appropriate tradeoff given that garbage collection is not on the critical path, and it's not likely that GC will be interrupted on every attempt.
Show 8 quoted lines
> @@ -807,7 +800,6 @@ int cmd_gc(int argc, const char **argv, const char *prefix)
> git_path("gc.log"),
> LOCK_DIE_ON_ERROR);
> dup2(get_lock_file_fd(&log_lock), 2);
> - sigchain_push_common(process_log_file_on_signal);
> atexit(process_log_file_at_exit);
> }
>