summaryrefslogtreecommitdiff
path: root/diff.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-09-30 11:13:43 +0200
committerJunio C Hamano <gitster@pobox.com>2024-09-30 11:23:05 -0700
commitfdf972a9df19915ef7bddf447bfecbcd0d8aea17 (patch)
treef72a890e976af81145cba1ef476afb14a19d7b8f /diff.c
parent58888c0401a43bfe2953b0508b5f1bd6c3f32b89 (diff)
builtin/revert: fix leaking `gpg_sign` and `strategy` config
We leak the config values when `gpg_sign` or `strategy` options are being overridden via the command line. To fix this we need to free the old value, which requires us to figure out whether the value was changed via an option in the first place. The easy way to do this, which is to initialize local variables with `NULL`, doesn't work because we cannot tell the case where the user has passed e.g. `--no-gpg-sign`. Instead, we use a sentinel value for both values that we can compare against to check whether the user has passed the option. Signed-off-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diff.c')
0 files changed, 0 insertions, 0 deletions