diff options
author | Elijah Newren <newren@gmail.com> | 2023-02-24 03:09:24 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2023-02-24 04:25:28 +0300 |
commit | 36bf19589055fb71aac0ed6719dfe5b385adc2bf (patch) | |
tree | 7763ee134c0aeb3cbe8d4a5eb7bdeaed5ff4e31d /builtin | |
parent | 15db4e7f4ac20cc41902a2479c7784fff8edf2e9 (diff) |
alloc.h: move ALLOC_GROW() functions from cache.h
This allows us to replace includes of cache.h with includes of the much
smaller alloc.h in many places. It does mean that we also need to add
includes of alloc.h in a number of C files.
Signed-off-by: Elijah Newren <newren@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/blame.c | 3 | ||||
-rw-r--r-- | builtin/cat-file.c | 1 | ||||
-rw-r--r-- | builtin/checkout--worker.c | 1 | ||||
-rw-r--r-- | builtin/config.c | 2 | ||||
-rw-r--r-- | builtin/credential-cache--daemon.c | 1 | ||||
-rw-r--r-- | builtin/fetch-pack.c | 1 | ||||
-rw-r--r-- | builtin/fsmonitor--daemon.c | 1 | ||||
-rw-r--r-- | builtin/grep.c | 1 | ||||
-rw-r--r-- | builtin/index-pack.c | 1 | ||||
-rw-r--r-- | builtin/log.c | 3 | ||||
-rw-r--r-- | builtin/merge.c | 1 | ||||
-rw-r--r-- | builtin/mktree.c | 1 | ||||
-rw-r--r-- | builtin/mv.c | 1 | ||||
-rw-r--r-- | builtin/name-rev.c | 2 | ||||
-rw-r--r-- | builtin/pack-objects.c | 2 | ||||
-rw-r--r-- | builtin/repack.c | 2 | ||||
-rw-r--r-- | builtin/rev-parse.c | 1 | ||||
-rw-r--r-- | builtin/revert.c | 3 | ||||
-rw-r--r-- | builtin/rm.c | 1 | ||||
-rw-r--r-- | builtin/submodule--helper.c | 1 |
20 files changed, 23 insertions, 7 deletions
diff --git a/builtin/blame.c b/builtin/blame.c index 71f925e456..4d1609c9ac 100644 --- a/builtin/blame.c +++ b/builtin/blame.c @@ -5,7 +5,8 @@ * See COPYING for licensing conditions */ -#include "cache.h" +#include "git-compat-util.h" +#include "alloc.h" #include "config.h" #include "color.h" #include "builtin.h" diff --git a/builtin/cat-file.c b/builtin/cat-file.c index cc17635e76..5b8be7cb63 100644 --- a/builtin/cat-file.c +++ b/builtin/cat-file.c @@ -5,6 +5,7 @@ */ #define USE_THE_INDEX_VARIABLE #include "cache.h" +#include "alloc.h" #include "config.h" #include "builtin.h" #include "diff.h" diff --git a/builtin/checkout--worker.c b/builtin/checkout--worker.c index ede7dc32a4..0a7d762573 100644 --- a/builtin/checkout--worker.c +++ b/builtin/checkout--worker.c @@ -1,4 +1,5 @@ #include "builtin.h" +#include "alloc.h" #include "config.h" #include "entry.h" #include "parallel-checkout.h" diff --git a/builtin/config.c b/builtin/config.c index 060cf9f3e0..ca006e9cc1 100644 --- a/builtin/config.c +++ b/builtin/config.c @@ -1,5 +1,5 @@ #include "builtin.h" -#include "cache.h" +#include "alloc.h" #include "config.h" #include "color.h" #include "parse-options.h" diff --git a/builtin/credential-cache--daemon.c b/builtin/credential-cache--daemon.c index f3c89831d4..590aefc6ea 100644 --- a/builtin/credential-cache--daemon.c +++ b/builtin/credential-cache--daemon.c @@ -1,4 +1,5 @@ #include "builtin.h" +#include "alloc.h" #include "parse-options.h" #ifndef NO_UNIX_SOCKETS diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index afe679368d..113f22c09d 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -1,4 +1,5 @@ #include "builtin.h" +#include "alloc.h" #include "pkt-line.h" #include "fetch-pack.h" #include "remote.h" diff --git a/builtin/fsmonitor--daemon.c b/builtin/fsmonitor--daemon.c index 0feef8caf6..cae804a190 100644 --- a/builtin/fsmonitor--daemon.c +++ b/builtin/fsmonitor--daemon.c @@ -1,4 +1,5 @@ #include "builtin.h" +#include "alloc.h" #include "config.h" #include "parse-options.h" #include "fsmonitor.h" diff --git a/builtin/grep.c b/builtin/grep.c index f7821c5fbb..a08e5841dd 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -4,6 +4,7 @@ * Copyright (c) 2006 Junio C Hamano */ #include "cache.h" +#include "alloc.h" #include "repository.h" #include "config.h" #include "blob.h" diff --git a/builtin/index-pack.c b/builtin/index-pack.c index 6648f2daef..7e4b69f9a3 100644 --- a/builtin/index-pack.c +++ b/builtin/index-pack.c @@ -1,4 +1,5 @@ #include "builtin.h" +#include "alloc.h" #include "config.h" #include "delta.h" #include "pack.h" diff --git a/builtin/log.c b/builtin/log.c index 04412dd9c9..85540963d9 100644 --- a/builtin/log.c +++ b/builtin/log.c @@ -4,7 +4,8 @@ * (C) Copyright 2006 Linus Torvalds * 2006 Junio Hamano */ -#include "cache.h" +#include "git-compat-util.h" +#include "alloc.h" #include "config.h" #include "refs.h" #include "object-store.h" diff --git a/builtin/merge.c b/builtin/merge.c index 0a3c10a096..716a23f880 100644 --- a/builtin/merge.c +++ b/builtin/merge.c @@ -8,6 +8,7 @@ #define USE_THE_INDEX_VARIABLE #include "cache.h" +#include "alloc.h" #include "config.h" #include "parse-options.h" #include "builtin.h" diff --git a/builtin/mktree.c b/builtin/mktree.c index 06d81400f5..ec721ffb94 100644 --- a/builtin/mktree.c +++ b/builtin/mktree.c @@ -4,6 +4,7 @@ * Copyright (c) Junio C Hamano, 2006, 2009 */ #include "builtin.h" +#include "alloc.h" #include "quote.h" #include "tree.h" #include "parse-options.h" diff --git a/builtin/mv.c b/builtin/mv.c index edd7b931fd..8129050377 100644 --- a/builtin/mv.c +++ b/builtin/mv.c @@ -5,6 +5,7 @@ */ #define USE_THE_INDEX_VARIABLE #include "builtin.h" +#include "alloc.h" #include "config.h" #include "pathspec.h" #include "lockfile.h" diff --git a/builtin/name-rev.c b/builtin/name-rev.c index 97959bfaf9..29752e7afe 100644 --- a/builtin/name-rev.c +++ b/builtin/name-rev.c @@ -1,5 +1,5 @@ #include "builtin.h" -#include "cache.h" +#include "alloc.h" #include "repository.h" #include "config.h" #include "commit.h" diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 74a167a180..72c33fd739 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -1,5 +1,5 @@ #include "builtin.h" -#include "cache.h" +#include "alloc.h" #include "repository.h" #include "config.h" #include "attr.h" diff --git a/builtin/repack.c b/builtin/repack.c index f649379531..545b368168 100644 --- a/builtin/repack.c +++ b/builtin/repack.c @@ -1,5 +1,5 @@ #include "builtin.h" -#include "cache.h" +#include "alloc.h" #include "config.h" #include "dir.h" #include "parse-options.h" diff --git a/builtin/rev-parse.c b/builtin/rev-parse.c index e67999e5eb..fd4f59ff2b 100644 --- a/builtin/rev-parse.c +++ b/builtin/rev-parse.c @@ -5,6 +5,7 @@ */ #define USE_THE_INDEX_VARIABLE #include "cache.h" +#include "alloc.h" #include "config.h" #include "commit.h" #include "refs.h" diff --git a/builtin/revert.c b/builtin/revert.c index 77d2035616..62986a7b1b 100644 --- a/builtin/revert.c +++ b/builtin/revert.c @@ -1,4 +1,5 @@ -#include "cache.h" +#include "git-compat-util.h" +#include "alloc.h" #include "config.h" #include "builtin.h" #include "parse-options.h" diff --git a/builtin/rm.c b/builtin/rm.c index 8844f90655..dc198f7908 100644 --- a/builtin/rm.c +++ b/builtin/rm.c @@ -5,6 +5,7 @@ */ #define USE_THE_INDEX_VARIABLE #include "builtin.h" +#include "alloc.h" #include "advice.h" #include "config.h" #include "lockfile.h" diff --git a/builtin/submodule--helper.c b/builtin/submodule--helper.c index 4c173d8b37..9edc785d8d 100644 --- a/builtin/submodule--helper.c +++ b/builtin/submodule--helper.c @@ -1,5 +1,6 @@ #define USE_THE_INDEX_VARIABLE #include "builtin.h" +#include "alloc.h" #include "repository.h" #include "cache.h" #include "config.h" |