summaryrefslogtreecommitdiff
path: root/commit.h
diff options
context:
space:
mode:
authorTaylor Blau <me@ttaylorr.com>2023-09-13 15:18:00 -0400
committerJunio C Hamano <gitster@pobox.com>2023-09-13 12:32:48 -0700
commit4a17e97246470049b8bde5be0d767ef66e550555 (patch)
treec85d9bd049f3ecef8b39dab61e4627518b4fb05c /commit.h
parenteabfaf8e8db27dd76ec1f1d4e0a2a124374475ab (diff)
builtin/repack.c: avoid directly inspecting "util"
The `->util` field corresponding to each string_list_item is used to track the existence of some pack at the beginning of a repack operation was originally intended to be used as a bitfield. This bitfield tracked: - (1 << 0): whether or not the pack should be deleted - (1 << 1): whether or not the pack is cruft The previous commit removed the use of the second bit, but a future patch (from a different series than this one) will introduce a new use of it. So we could stop treating the util pointer as a bitfield and instead start treating it as if it were a boolean. But this would require some backtracking when that later patch is applied. Instead, let's avoid touching the ->util field directly, and instead introduce convenience functions like: - pack_mark_for_deletion() - pack_is_marked_for_deletion() Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Jeff King <peff@peff.net> Helped-by: Patrick Steinhardt <ps@pks.im> Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'commit.h')
0 files changed, 0 insertions, 0 deletions