]> git.ipfire.org Git - thirdparty/git.git/commit
reflog delete: narrow scope of "cmd" passed to count_reflog_ent()
authorÆvar Arnfjörð Bjarmason <avarab@gmail.com>
Wed, 22 Dec 2021 04:06:40 +0000 (05:06 +0100)
committerJunio C Hamano <gitster@pobox.com>
Thu, 23 Dec 2021 00:24:13 +0000 (16:24 -0800)
commit4a0339b36fa48c2bd8dd3becbe87bd59a958b306
treed905bc88873307821930755d2d2048d62f6224f9
parent597af311a2899bfd6640b9b107622c5795d5f998
reflog delete: narrow scope of "cmd" passed to count_reflog_ent()

Change the "cb_data" we pass to the count_reflog_ent() to be the
&cb.cmd itself, instead of passing &cb and having the callback lookup
cb->cmd.

This makes it clear that the "cb" itself is the same memzero'd
structure on each iteration of the for-loop that uses &cb, except for
the "cmd" member.

Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/reflog.c