diff options
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | 2021-12-22 05:06:41 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-12-22 16:24:13 -0800 |
commit | 46fbe418b283f174e2650c611181c005570e7b88 (patch) | |
tree | 3a0d56ea79518b1f1b55044ee21400898be1e599 /t/t4135-apply-weird-filenames.sh | |
parent | reflog delete: narrow scope of "cmd" passed to count_reflog_ent() (diff) | |
download | tgif-46fbe418b283f174e2650c611181c005570e7b88.tar.xz |
reflog expire: narrow scope of "cb" in cmd_reflog_expire()
As with the preceding change for "reflog delete", change the "cb_data"
we pass to callbacks to be &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-loops that use &cb, except for
the "cmd" member.
The "struct expire_reflog_policy_cb" we pass to reflog_expire() will
have the members that aren't "cmd" modified by the callbacks, but
before we invoke them everything except "cmd" is zero'd out.
This included the "tip_commit", "mark_list" and "tips". It might have
looked as though we were re-using those between iterations, but the
first thing we did in reflog_expiry_prepare() was to either NULL them,
or clobber them with another value.
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4135-apply-weird-filenames.sh')
0 files changed, 0 insertions, 0 deletions