1
0
mirror of https://github.com/git/git.git synced 2024-09-24 06:41:47 +02:00
git/builtin
Jeff King d3d9c51973 repack: convert "names" util bitfield to array
We keep a string_list "names" containing the hashes of packs generated
on our behalf by pack-objects. The util field of each item is treated as
a bitfield that tells us which extensions (.pack, .idx, .rev, etc) are
present for each name.

Let's switch this to allocating a real array. That will give us room in
a future patch to store more data than just a single bit per extension.
And it makes the code a little easier to read, as we avoid casting back
and forth between uintptr_t and a void pointer.

Since the only thing we're storing is an array, we could just allocate
it directly. But instead I've put it into a named struct here. That
further increases readability around the casts, and in particular helps
differentiate us from other string_lists in the same file which use
their util field differently. E.g., the existing_*_packs lists still do
bit-twiddling, but their bits have different meaning than the ones in
"names". This makes it hard to grep around the code to see how the util
fields are used; now you can look for "generated_pack_data".

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2022-10-21 18:03:52 -07:00
..
add.c
am.c git-compat-util.h: use "UNUSED", not "UNUSED(var)" 2022-09-01 10:49:48 -07:00
annotate.c
apply.c
archive.c
bisect--helper.c Merge branch 'ab/unused-annotation' 2022-09-14 12:56:39 -07:00
blame.c
branch.c
bugreport.c
bundle.c
cat-file.c
check-attr.c
check-ignore.c
check-mailmap.c
check-ref-format.c
checkout--worker.c
checkout-index.c
checkout.c git-compat-util.h: use "UNUSED", not "UNUSED(var)" 2022-09-01 10:49:48 -07:00
clean.c
clone.c Sync with 2.37.4 2022-10-06 20:00:04 -04:00
column.c
commit-graph.c Merge branch 'ab/unused-annotation' 2022-09-14 12:56:39 -07:00
commit-tree.c
commit.c
config.c git-compat-util.h: use "UNUSED", not "UNUSED(var)" 2022-09-01 10:49:48 -07:00
count-objects.c
credential-cache--daemon.c
credential-cache.c
credential-store.c
credential.c
describe.c git-compat-util.h: use "UNUSED", not "UNUSED(var)" 2022-09-01 10:49:48 -07:00
diagnose.c builtin/diagnose.c: don't translate the two mode values 2022-09-21 11:53:35 -07:00
diff-files.c
diff-index.c
diff-tree.c
diff.c
difftool.c Merge branch 'ab/unused-annotation' 2022-09-14 12:56:39 -07:00
env--helper.c
fast-export.c Merge branch 'ab/unused-annotation' 2022-09-14 12:56:39 -07:00
fast-import.c git-compat-util.h: use "UNUSED", not "UNUSED(var)" 2022-09-01 10:49:48 -07:00
fetch-pack.c list-objects-filter: add and use initializers 2022-09-12 08:38:59 -07:00
fetch.c Merge branch 'jk/list-objects-filter-cleanup' 2022-09-19 14:35:24 -07:00
fmt-merge-msg.c
for-each-ref.c
for-each-repo.c
fsck.c git-compat-util.h: use "UNUSED", not "UNUSED(var)" 2022-09-01 10:49:48 -07:00
fsmonitor--daemon.c
gc.c Merge branch 'sg/parse-options-subcommand' 2022-09-21 15:27:03 -07:00
get-tar-commit-id.c
grep.c
hash-object.c
help.c git help: special-case scalar 2022-09-02 10:02:56 -07:00
hook.c
index-pack.c
init-db.c
interpret-trailers.c
log.c Merge branch 'ab/unused-annotation' 2022-09-14 12:56:39 -07:00
ls-files.c ls-files: fix black space in error message 2022-09-12 09:25:40 -07:00
ls-remote.c
ls-tree.c git-compat-util.h: use "UNUSED", not "UNUSED(var)" 2022-09-01 10:49:48 -07:00
mailinfo.c
mailsplit.c
merge-base.c
merge-file.c
merge-index.c
merge-ours.c
merge-recursive.c
merge-tree.c
merge.c Merge branch 'en/merge-unstash-only-on-clean-merge' into maint 2022-09-13 12:21:11 -07:00
mktag.c
mktree.c
multi-pack-index.c Merge branch 'ab/unused-annotation' 2022-09-14 12:56:39 -07:00
mv.c Merge branch 'sy/mv-out-of-cone' 2022-09-19 14:35:23 -07:00
name-rev.c git-compat-util.h: use "UNUSED", not "UNUSED(var)" 2022-09-01 10:49:48 -07:00
notes.c notes, remote: show unknown subcommands between `' 2022-09-07 12:06:12 -07:00
pack-objects.c Merge branch 'ab/unused-annotation' 2022-09-14 12:56:39 -07:00
pack-redundant.c
pack-refs.c
patch-id.c
prune-packed.c
prune.c
pull.c
push.c
range-diff.c
read-tree.c
rebase.c
receive-pack.c git-compat-util.h: use "UNUSED", not "UNUSED(var)" 2022-09-01 10:49:48 -07:00
reflog.c Merge branch 'ab/unused-annotation' 2022-09-14 12:56:39 -07:00
remote-ext.c
remote-fd.c
remote.c Merge branch 'ab/unused-annotation' 2022-09-14 12:56:39 -07:00
repack.c repack: convert "names" util bitfield to array 2022-10-21 18:03:52 -07:00
replace.c
rerere.c
reset.c
rev-list.c
rev-parse.c Merge branch 'ab/unused-annotation' 2022-09-14 12:56:39 -07:00
revert.c
rm.c
send-pack.c
shortlog.c
show-branch.c git-compat-util.h: use "UNUSED", not "UNUSED(var)" 2022-09-01 10:49:48 -07:00
show-index.c
show-ref.c git-compat-util.h: use "UNUSED", not "UNUSED(var)" 2022-09-01 10:49:48 -07:00
sparse-checkout.c
stash.c Merge branch 'ab/unused-annotation' 2022-09-14 12:56:39 -07:00
stripspace.c
submodule--helper.c Merge branch 'jk/list-objects-filter-cleanup' 2022-09-19 14:35:24 -07:00
symbolic-ref.c
tag.c
unpack-file.c
unpack-objects.c
update-index.c
update-ref.c
update-server-info.c
upload-archive.c
upload-pack.c
var.c
verify-commit.c
verify-pack.c
verify-tag.c
worktree.c
write-tree.c