summaryrefslogtreecommitdiff
path: root/builtin/var.c
diff options
context:
space:
mode:
authorLibravatar Ævar Arnfjörð Bjarmason <avarab@gmail.com>2021-12-22 05:06:44 +0100
committerLibravatar Junio C Hamano <gitster@pobox.com>2021-12-22 16:24:13 -0800
commit07815e2d97aa177780ea0d67069b5abd0524f936 (patch)
tree4b89f69f8a8c77235dc4358c267badd30ebb506d /builtin/var.c
parentreflog expire: use "switch" over enum values (diff)
downloadtgif-07815e2d97aa177780ea0d67069b5abd0524f936.tar.xz
reflog expire: refactor & use "tip_commit" only for UE_NORMAL
Add an intermediate variable for "tip_commit" in reflog_expiry_prepare(), and only add it to the struct if we're handling the UE_NORMAL case. The code behaves the same way as before, but this makes the control flow clearer, and the shorter name allows us to fold a 4-line i/else into a one-line ternary instead. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin/var.c')
0 files changed, 0 insertions, 0 deletions