Git fork

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>

authored by

Calvin Wan and committed by
Junio C Hamano
91c080df da9502ff

+75 -161
-1
add-patch.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "add-interactive.h" 3 3 #include "advice.h" 4 - #include "alloc.h" 5 4 #include "editor.h" 6 5 #include "environment.h" 7 6 #include "gettext.h"
-1
alias.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "alias.h" 3 - #include "alloc.h" 4 3 #include "config.h" 5 4 #include "gettext.h" 6 5 #include "strbuf.h"
-75
alloc.h
··· 17 17 struct alloc_state *allocate_alloc_state(void); 18 18 void clear_alloc_state(struct alloc_state *s); 19 19 20 - #define alloc_nr(x) (((x)+16)*3/2) 21 - 22 - /** 23 - * Dynamically growing an array using realloc() is error prone and boring. 24 - * 25 - * Define your array with: 26 - * 27 - * - a pointer (`item`) that points at the array, initialized to `NULL` 28 - * (although please name the variable based on its contents, not on its 29 - * type); 30 - * 31 - * - an integer variable (`alloc`) that keeps track of how big the current 32 - * allocation is, initialized to `0`; 33 - * 34 - * - another integer variable (`nr`) to keep track of how many elements the 35 - * array currently has, initialized to `0`. 36 - * 37 - * Then before adding `n`th element to the item, call `ALLOC_GROW(item, n, 38 - * alloc)`. This ensures that the array can hold at least `n` elements by 39 - * calling `realloc(3)` and adjusting `alloc` variable. 40 - * 41 - * ------------ 42 - * sometype *item; 43 - * size_t nr; 44 - * size_t alloc 45 - * 46 - * for (i = 0; i < nr; i++) 47 - * if (we like item[i] already) 48 - * return; 49 - * 50 - * // we did not like any existing one, so add one 51 - * ALLOC_GROW(item, nr + 1, alloc); 52 - * item[nr++] = value you like; 53 - * ------------ 54 - * 55 - * You are responsible for updating the `nr` variable. 56 - * 57 - * If you need to specify the number of elements to allocate explicitly 58 - * then use the macro `REALLOC_ARRAY(item, alloc)` instead of `ALLOC_GROW`. 59 - * 60 - * Consider using ALLOC_GROW_BY instead of ALLOC_GROW as it has some 61 - * added niceties. 62 - * 63 - * DO NOT USE any expression with side-effect for 'x', 'nr', or 'alloc'. 64 - */ 65 - #define ALLOC_GROW(x, nr, alloc) \ 66 - do { \ 67 - if ((nr) > alloc) { \ 68 - if (alloc_nr(alloc) < (nr)) \ 69 - alloc = (nr); \ 70 - else \ 71 - alloc = alloc_nr(alloc); \ 72 - REALLOC_ARRAY(x, alloc); \ 73 - } \ 74 - } while (0) 75 - 76 - /* 77 - * Similar to ALLOC_GROW but handles updating of the nr value and 78 - * zeroing the bytes of the newly-grown array elements. 79 - * 80 - * DO NOT USE any expression with side-effect for any of the 81 - * arguments. 82 - */ 83 - #define ALLOC_GROW_BY(x, nr, increase, alloc) \ 84 - do { \ 85 - if (increase) { \ 86 - size_t new_nr = nr + (increase); \ 87 - if (new_nr < nr) \ 88 - BUG("negative growth in ALLOC_GROW_BY"); \ 89 - ALLOC_GROW(x, new_nr, alloc); \ 90 - memset((x) + nr, 0, sizeof(*(x)) * (increase)); \ 91 - nr = new_nr; \ 92 - } \ 93 - } while (0) 94 - 95 20 #endif
-1
apply.c
··· 9 9 10 10 #include "git-compat-util.h" 11 11 #include "abspath.h" 12 - #include "alloc.h" 13 12 #include "base85.h" 14 13 #include "config.h" 15 14 #include "object-store-ll.h"
-1
archive-tar.c
··· 2 2 * Copyright (c) 2005, 2006 Rene Scharfe 3 3 */ 4 4 #include "git-compat-util.h" 5 - #include "alloc.h" 6 5 #include "config.h" 7 6 #include "gettext.h" 8 7 #include "git-zlib.h"
-1
archive.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "abspath.h" 3 - #include "alloc.h" 4 3 #include "config.h" 5 4 #include "convert.h" 6 5 #include "environment.h"
-1
attr.c
··· 7 7 */ 8 8 9 9 #include "git-compat-util.h" 10 - #include "alloc.h" 11 10 #include "config.h" 12 11 #include "environment.h" 13 12 #include "exec-cmd.h"
-1
builtin/blame.c
··· 6 6 */ 7 7 8 8 #include "git-compat-util.h" 9 - #include "alloc.h" 10 9 #include "config.h" 11 10 #include "color.h" 12 11 #include "builtin.h"
-1
builtin/cat-file.c
··· 5 5 */ 6 6 #define USE_THE_INDEX_VARIABLE 7 7 #include "builtin.h" 8 - #include "alloc.h" 9 8 #include "config.h" 10 9 #include "convert.h" 11 10 #include "diff.h"
-1
builtin/checkout--worker.c
··· 1 1 #include "builtin.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "entry.h" 5 4 #include "gettext.h"
-1
builtin/config.c
··· 1 1 #include "builtin.h" 2 2 #include "abspath.h" 3 - #include "alloc.h" 4 3 #include "config.h" 5 4 #include "color.h" 6 5 #include "editor.h"
-1
builtin/credential-cache--daemon.c
··· 1 1 #include "builtin.h" 2 2 #include "abspath.h" 3 - #include "alloc.h" 4 3 #include "gettext.h" 5 4 #include "object-file.h" 6 5 #include "parse-options.h"
-1
builtin/fetch-pack.c
··· 1 1 #include "builtin.h" 2 - #include "alloc.h" 3 2 #include "gettext.h" 4 3 #include "hex.h" 5 4 #include "object-file.h"
-1
builtin/fsmonitor--daemon.c
··· 1 1 #include "builtin.h" 2 2 #include "abspath.h" 3 - #include "alloc.h" 4 3 #include "config.h" 5 4 #include "environment.h" 6 5 #include "gettext.h"
-1
builtin/grep.c
··· 4 4 * Copyright (c) 2006 Junio C Hamano 5 5 */ 6 6 #include "builtin.h" 7 - #include "alloc.h" 8 7 #include "gettext.h" 9 8 #include "hex.h" 10 9 #include "repository.h"
-1
builtin/index-pack.c
··· 1 1 #include "builtin.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "delta.h" 5 4 #include "environment.h"
-1
builtin/log.c
··· 6 6 */ 7 7 #include "git-compat-util.h" 8 8 #include "abspath.h" 9 - #include "alloc.h" 10 9 #include "config.h" 11 10 #include "environment.h" 12 11 #include "gettext.h"
-1
builtin/merge.c
··· 10 10 #include "builtin.h" 11 11 #include "abspath.h" 12 12 #include "advice.h" 13 - #include "alloc.h" 14 13 #include "config.h" 15 14 #include "editor.h" 16 15 #include "environment.h"
-1
builtin/mktree.c
··· 4 4 * Copyright (c) Junio C Hamano, 2006, 2009 5 5 */ 6 6 #include "builtin.h" 7 - #include "alloc.h" 8 7 #include "gettext.h" 9 8 #include "hex.h" 10 9 #include "quote.h"
-1
builtin/mv.c
··· 7 7 #include "builtin.h" 8 8 #include "abspath.h" 9 9 #include "advice.h" 10 - #include "alloc.h" 11 10 #include "config.h" 12 11 #include "environment.h" 13 12 #include "gettext.h"
-1
builtin/name-rev.c
··· 1 1 #include "builtin.h" 2 - #include "alloc.h" 3 2 #include "environment.h" 4 3 #include "gettext.h" 5 4 #include "hex.h"
-1
builtin/pack-objects.c
··· 1 1 #include "builtin.h" 2 - #include "alloc.h" 3 2 #include "environment.h" 4 3 #include "gettext.h" 5 4 #include "hex.h"
-1
builtin/repack.c
··· 1 1 #include "builtin.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "dir.h" 5 4 #include "environment.h"
-1
builtin/rev-parse.c
··· 6 6 #define USE_THE_INDEX_VARIABLE 7 7 #include "builtin.h" 8 8 #include "abspath.h" 9 - #include "alloc.h" 10 9 #include "config.h" 11 10 #include "commit.h" 12 11 #include "environment.h"
-1
builtin/revert.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "builtin.h" 5 4 #include "parse-options.h"
-1
builtin/rm.c
··· 5 5 */ 6 6 #define USE_THE_INDEX_VARIABLE 7 7 #include "builtin.h" 8 - #include "alloc.h" 9 8 #include "advice.h" 10 9 #include "config.h" 11 10 #include "lockfile.h"
-1
builtin/submodule--helper.c
··· 1 1 #define USE_THE_INDEX_VARIABLE 2 2 #include "builtin.h" 3 3 #include "abspath.h" 4 - #include "alloc.h" 5 4 #include "environment.h" 6 5 #include "gettext.h" 7 6 #include "hex.h"
-1
bulk-checkin.c
··· 2 2 * Copyright (c) 2011, Google Inc. 3 3 */ 4 4 #include "git-compat-util.h" 5 - #include "alloc.h" 6 5 #include "bulk-checkin.h" 7 6 #include "environment.h" 8 7 #include "gettext.h"
-1
cache-tree.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "environment.h" 4 3 #include "hex.h" 5 4 #include "lockfile.h"
-1
chunk-format.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "chunk-format.h" 4 3 #include "csum-file.h" 5 4 #include "gettext.h"
-1
commit-reach.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "commit.h" 4 3 #include "commit-graph.h" 5 4 #include "decorate.h"
-1
config.c
··· 8 8 #include "git-compat-util.h" 9 9 #include "abspath.h" 10 10 #include "advice.h" 11 - #include "alloc.h" 12 11 #include "date.h" 13 12 #include "branch.h" 14 13 #include "config.h"
-1
daemon.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "abspath.h" 3 - #include "alloc.h" 4 3 #include "config.h" 5 4 #include "environment.h" 6 5 #include "path.h"
-1
delta-islands.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "attr.h" 4 3 #include "object.h" 5 4 #include "blob.h"
-1
diff.c
··· 3 3 */ 4 4 #include "git-compat-util.h" 5 5 #include "abspath.h" 6 - #include "alloc.h" 7 6 #include "base85.h" 8 7 #include "config.h" 9 8 #include "convert.h"
-1
diffcore-rename.c
··· 3 3 * Copyright (C) 2005 Junio C Hamano 4 4 */ 5 5 #include "git-compat-util.h" 6 - #include "alloc.h" 7 6 #include "diff.h" 8 7 #include "diffcore.h" 9 8 #include "object-store-ll.h"
-1
dir-iterator.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "dir.h" 4 3 #include "iterator.h" 5 4 #include "dir-iterator.h"
-1
dir.c
··· 7 7 */ 8 8 #include "git-compat-util.h" 9 9 #include "abspath.h" 10 - #include "alloc.h" 11 10 #include "config.h" 12 11 #include "convert.h" 13 12 #include "dir.h"
-1
ewah/bitmap.c
··· 17 17 * along with this program; if not, see <http://www.gnu.org/licenses/>. 18 18 */ 19 19 #include "git-compat-util.h" 20 - #include "alloc.h" 21 20 #include "ewok.h" 22 21 23 22 #define EWAH_MASK(x) ((eword_t)1 << (x % BITS_IN_EWORD))
-1
ewah/ewah_bitmap.c
··· 17 17 * along with this program; if not, see <http://www.gnu.org/licenses/>. 18 18 */ 19 19 #include "git-compat-util.h" 20 - #include "alloc.h" 21 20 #include "ewok.h" 22 21 #include "ewok_rlw.h" 23 22
-1
fetch-pack.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "repository.h" 4 3 #include "config.h" 5 4 #include "date.h"
-1
fmt-merge-msg.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "environment.h" 5 4 #include "refs.h"
-1
fsck.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "date.h" 4 3 #include "dir.h" 5 4 #include "hex.h"
+75
git-compat-util.h
··· 1134 1134 #define FLEXPTR_ALLOC_STR(x, ptrname, str) \ 1135 1135 FLEXPTR_ALLOC_MEM((x), ptrname, (str), strlen(str)) 1136 1136 1137 + #define alloc_nr(x) (((x)+16)*3/2) 1138 + 1139 + /** 1140 + * Dynamically growing an array using realloc() is error prone and boring. 1141 + * 1142 + * Define your array with: 1143 + * 1144 + * - a pointer (`item`) that points at the array, initialized to `NULL` 1145 + * (although please name the variable based on its contents, not on its 1146 + * type); 1147 + * 1148 + * - an integer variable (`alloc`) that keeps track of how big the current 1149 + * allocation is, initialized to `0`; 1150 + * 1151 + * - another integer variable (`nr`) to keep track of how many elements the 1152 + * array currently has, initialized to `0`. 1153 + * 1154 + * Then before adding `n`th element to the item, call `ALLOC_GROW(item, n, 1155 + * alloc)`. This ensures that the array can hold at least `n` elements by 1156 + * calling `realloc(3)` and adjusting `alloc` variable. 1157 + * 1158 + * ------------ 1159 + * sometype *item; 1160 + * size_t nr; 1161 + * size_t alloc 1162 + * 1163 + * for (i = 0; i < nr; i++) 1164 + * if (we like item[i] already) 1165 + * return; 1166 + * 1167 + * // we did not like any existing one, so add one 1168 + * ALLOC_GROW(item, nr + 1, alloc); 1169 + * item[nr++] = value you like; 1170 + * ------------ 1171 + * 1172 + * You are responsible for updating the `nr` variable. 1173 + * 1174 + * If you need to specify the number of elements to allocate explicitly 1175 + * then use the macro `REALLOC_ARRAY(item, alloc)` instead of `ALLOC_GROW`. 1176 + * 1177 + * Consider using ALLOC_GROW_BY instead of ALLOC_GROW as it has some 1178 + * added niceties. 1179 + * 1180 + * DO NOT USE any expression with side-effect for 'x', 'nr', or 'alloc'. 1181 + */ 1182 + #define ALLOC_GROW(x, nr, alloc) \ 1183 + do { \ 1184 + if ((nr) > alloc) { \ 1185 + if (alloc_nr(alloc) < (nr)) \ 1186 + alloc = (nr); \ 1187 + else \ 1188 + alloc = alloc_nr(alloc); \ 1189 + REALLOC_ARRAY(x, alloc); \ 1190 + } \ 1191 + } while (0) 1192 + 1193 + /* 1194 + * Similar to ALLOC_GROW but handles updating of the nr value and 1195 + * zeroing the bytes of the newly-grown array elements. 1196 + * 1197 + * DO NOT USE any expression with side-effect for any of the 1198 + * arguments. 1199 + */ 1200 + #define ALLOC_GROW_BY(x, nr, increase, alloc) \ 1201 + do { \ 1202 + if (increase) { \ 1203 + size_t new_nr = nr + (increase); \ 1204 + if (new_nr < nr) \ 1205 + BUG("negative growth in ALLOC_GROW_BY"); \ 1206 + ALLOC_GROW(x, new_nr, alloc); \ 1207 + memset((x) + nr, 0, sizeof(*(x)) * (increase)); \ 1208 + nr = new_nr; \ 1209 + } \ 1210 + } while (0) 1211 + 1137 1212 static inline char *xstrdup_or_null(const char *str) 1138 1213 { 1139 1214 return str ? xstrdup(str) : NULL;
-1
help.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "builtin.h" 5 4 #include "exec-cmd.h"
-1
http-backend.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "environment.h" 5 4 #include "git-zlib.h"
-1
line-log.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "line-range.h" 4 3 #include "hex.h" 5 4 #include "tag.h"
-1
list-objects-filter-options.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "commit.h" 4 3 #include "config.h" 5 4 #include "gettext.h"
-1
list-objects-filter.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "dir.h" 4 3 #include "gettext.h" 5 4 #include "hex.h"
-1
midx.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "abspath.h" 3 - #include "alloc.h" 4 3 #include "config.h" 5 4 #include "csum-file.h" 6 5 #include "dir.h"
-1
object-file.c
··· 8 8 */ 9 9 #include "git-compat-util.h" 10 10 #include "abspath.h" 11 - #include "alloc.h" 12 11 #include "config.h" 13 12 #include "convert.h" 14 13 #include "environment.h"
-1
oid-array.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "oid-array.h" 4 3 #include "hash-lookup.h" 5 4
-1
oidtree.c
··· 4 4 */ 5 5 #include "git-compat-util.h" 6 6 #include "oidtree.h" 7 - #include "alloc.h" 8 7 #include "hash.h" 9 8 10 9 struct oidtree_iter_data {
-1
pack-bitmap-write.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "environment.h" 4 3 #include "gettext.h" 5 4 #include "hex.h"
-1
pack-bitmap.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "commit.h" 4 3 #include "gettext.h" 5 4 #include "hex.h"
-1
pack-objects.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "object.h" 4 3 #include "pack.h" 5 4 #include "pack-objects.h"
-1
packfile.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "environment.h" 4 3 #include "gettext.h" 5 4 #include "hex.h"
-1
parallel-checkout.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "entry.h" 5 4 #include "gettext.h"
-1
pretty.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "commit.h" 5 4 #include "environment.h"
-1
prio-queue.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "prio-queue.h" 4 3 5 4 static inline int compare(struct prio_queue *queue, int i, int j)
-1
quote.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "path.h" 4 3 #include "quote.h" 5 4 #include "strbuf.h"
-1
read-cache.c
··· 4 4 * Copyright (C) Linus Torvalds, 2005 5 5 */ 6 6 #include "git-compat-util.h" 7 - #include "alloc.h" 8 7 #include "bulk-checkin.h" 9 8 #include "config.h" 10 9 #include "date.h"
-1
ref-filter.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "environment.h" 4 3 #include "gettext.h" 5 4 #include "gpg-interface.h"
-1
reflog-walk.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "commit.h" 4 3 #include "refs.h" 5 4 #include "diff.h"
-1
refs.c
··· 4 4 5 5 #include "git-compat-util.h" 6 6 #include "advice.h" 7 - #include "alloc.h" 8 7 #include "config.h" 9 8 #include "environment.h" 10 9 #include "hashmap.h"
-1
refspec.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "gettext.h" 4 3 #include "hash.h" 5 4 #include "hex.h"
-1
remote-curl.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "environment.h" 5 4 #include "gettext.h"
-1
remote.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "abspath.h" 3 - #include "alloc.h" 4 3 #include "config.h" 5 4 #include "environment.h" 6 5 #include "gettext.h"
-1
rerere.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "abspath.h" 3 - #include "alloc.h" 4 3 #include "config.h" 5 4 #include "copy.h" 6 5 #include "gettext.h"
-1
revision.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "environment.h" 5 4 #include "gettext.h"
-1
sequencer.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "abspath.h" 3 3 #include "advice.h" 4 - #include "alloc.h" 5 4 #include "config.h" 6 5 #include "copy.h" 7 6 #include "environment.h"
-1
server-info.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "dir.h" 4 3 #include "environment.h" 5 4 #include "hex.h"
-1
shallow.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "hex.h" 4 3 #include "repository.h" 5 4 #include "tempfile.h"
-1
sigchain.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "sigchain.h" 4 3 5 4 #define SIGCHAIN_MAX_SIGNALS 32
-1
sparse-index.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "environment.h" 4 3 #include "gettext.h" 5 4 #include "name-hash.h"
-1
split-index.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "gettext.h" 4 3 #include "hash.h" 5 4 #include "mem-pool.h"
-1
strbuf.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "abspath.h" 3 - #include "alloc.h" 4 3 #include "environment.h" 5 4 #include "gettext.h" 6 5 #include "hex.h"
-1
string-list.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "string-list.h" 3 - #include "alloc.h" 4 3 5 4 void string_list_init_nodup(struct string_list *list) 6 5 {
-1
strvec.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "strvec.h" 3 - #include "alloc.h" 4 3 #include "hex.h" 5 4 #include "strbuf.h" 6 5
-1
submodule-config.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "dir.h" 4 3 #include "environment.h" 5 4 #include "gettext.h"
-1
submodule.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "abspath.h" 3 - #include "alloc.h" 4 3 #include "repository.h" 5 4 #include "config.h" 6 5 #include "submodule-config.h"
-1
t/helper/test-reach.c
··· 1 1 #include "test-tool.h" 2 - #include "alloc.h" 3 2 #include "commit.h" 4 3 #include "commit-reach.h" 5 4 #include "config.h"
-1
trace2/tr2_tls.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "thread-utils.h" 4 3 #include "trace.h" 5 4 #include "trace2/tr2_tls.h"
-1
trailer.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "environment.h" 5 4 #include "gettext.h"
-1
transport.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "advice.h" 3 - #include "alloc.h" 4 3 #include "config.h" 5 4 #include "environment.h" 6 5 #include "hex.h"
-1
tree-walk.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "tree-walk.h" 3 - #include "alloc.h" 4 3 #include "dir.h" 5 4 #include "gettext.h" 6 5 #include "hex.h"
-1
userdiff.c
··· 1 1 #include "git-compat-util.h" 2 - #include "alloc.h" 3 2 #include "config.h" 4 3 #include "userdiff.h" 5 4 #include "attr.h"
-1
worktree.c
··· 1 1 #include "git-compat-util.h" 2 2 #include "abspath.h" 3 - #include "alloc.h" 4 3 #include "environment.h" 5 4 #include "gettext.h" 6 5 #include "path.h"