]> git.ipfire.org Git - thirdparty/git.git/commit
git-compat-util: move alloc macros to git-compat-util.h
authorCalvin Wan <calvinwan@google.com>
Wed, 5 Jul 2023 17:09:24 +0000 (17:09 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 5 Jul 2023 18:42:31 +0000 (11:42 -0700)
commit91c080dff511b7a81f91d1cc79589b49e16a2b7a
tree5730d26a094848ca2f652c507ce54519b981ef84
parentda9502ff4dc495471a1a080dc297cd6e4628c10c
git-compat-util: move alloc macros to git-compat-util.h

alloc_nr, ALLOC_GROW, and ALLOC_GROW_BY are commonly used macros for
dynamic array allocation. Moving these macros to git-compat-util.h with
the other alloc macros focuses alloc.[ch] to allocation for Git objects
and additionally allows us to remove inclusions to alloc.h from files
that solely used the above macros.

Signed-off-by: Calvin Wan <calvinwan@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
88 files changed:
add-patch.c
alias.c
alloc.h
apply.c
archive-tar.c
archive.c
attr.c
builtin/blame.c
builtin/cat-file.c
builtin/checkout--worker.c
builtin/config.c
builtin/credential-cache--daemon.c
builtin/fetch-pack.c
builtin/fsmonitor--daemon.c
builtin/grep.c
builtin/index-pack.c
builtin/log.c
builtin/merge.c
builtin/mktree.c
builtin/mv.c
builtin/name-rev.c
builtin/pack-objects.c
builtin/repack.c
builtin/rev-parse.c
builtin/revert.c
builtin/rm.c
builtin/submodule--helper.c
bulk-checkin.c
cache-tree.c
chunk-format.c
commit-reach.c
config.c
daemon.c
delta-islands.c
diff.c
diffcore-rename.c
dir-iterator.c
dir.c
ewah/bitmap.c
ewah/ewah_bitmap.c
fetch-pack.c
fmt-merge-msg.c
fsck.c
git-compat-util.h
help.c
http-backend.c
line-log.c
list-objects-filter-options.c
list-objects-filter.c
midx.c
object-file.c
oid-array.c
oidtree.c
pack-bitmap-write.c
pack-bitmap.c
pack-objects.c
packfile.c
parallel-checkout.c
pretty.c
prio-queue.c
quote.c
read-cache.c
ref-filter.c
reflog-walk.c
refs.c
refspec.c
remote-curl.c
remote.c
rerere.c
revision.c
sequencer.c
server-info.c
shallow.c
sigchain.c
sparse-index.c
split-index.c
strbuf.c
string-list.c
strvec.c
submodule-config.c
submodule.c
t/helper/test-reach.c
trace2/tr2_tls.c
trailer.c
transport.c
tree-walk.c
userdiff.c
worktree.c