summaryrefslogtreecommitdiff
path: root/git-gui/lib/commit.tcl
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2025-06-03 16:01:19 +0200
committerJunio C Hamano <gitster@pobox.com>2025-06-03 08:30:52 -0700
commitd2b084c66037f1a77b3e061ae7e4d96cbdbf6c05 (patch)
tree544cea981974816be57ec0fbbcaf5e6d278439c1 /git-gui/lib/commit.tcl
parent697202b0b1c7c02208c620f96c608e0817d079dd (diff)
builtin/gc: avoid global state in `gc_before_repack()`
The `gc_before_repack()` should only ever run once in git-gc(1), but we may end up calling it twice when the "--detach" flag is passed. The duplicated call is avoided though via a static flag in this function. This pattern is somewhat unintuitive though. Refactor it to drop the static flag and instead guard the second call of `gc_before_repack()` via `opts.detach`. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-gui/lib/commit.tcl')
0 files changed, 0 insertions, 0 deletions