Skip to content

Commit 08c46a4

Browse files
newrengitster
authored andcommitted
read-cache*.h: move declarations for read-cache.c functions from cache.h
For the functions defined in read-cache.c, move their declarations from cache.h to a new header, read-cache-ll.h. Also move some related inline functions from cache.h to read-cache.h. The purpose of the read-cache-ll.h/read-cache.h split is that about 70% of the sites don't need the inline functions and the extra headers they include. Signed-off-by: Elijah Newren <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent bc47f16 commit 08c46a4

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+603
-524
lines changed

add-interactive.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "gettext.h"
77
#include "hex.h"
88
#include "preload-index.h"
9+
#include "read-cache-ll.h"
910
#include "revision.h"
1011
#include "refs.h"
1112
#include "string-list.h"

add-patch.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "environment.h"
77
#include "gettext.h"
88
#include "object-name.h"
9+
#include "read-cache-ll.h"
910
#include "strbuf.h"
1011
#include "run-command.h"
1112
#include "strvec.h"

apply.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
#include "object-file.h"
2929
#include "parse-options.h"
3030
#include "quote.h"
31+
#include "read-cache.h"
3132
#include "rerere.h"
3233
#include "apply.h"
3334
#include "entry.h"

attr.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "gettext.h"
1717
#include "utf8.h"
1818
#include "quote.h"
19+
#include "read-cache-ll.h"
1920
#include "revision.h"
2021
#include "object-store.h"
2122
#include "setup.h"

blame.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include "diffcore.h"
99
#include "gettext.h"
1010
#include "hex.h"
11+
#include "read-cache.h"
1112
#include "setup.h"
1213
#include "tag.h"
1314
#include "trace2.h"

builtin/add.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
#include "preload-index.h"
2121
#include "diff.h"
2222
#include "diffcore.h"
23+
#include "read-cache.h"
2324
#include "revision.h"
2425
#include "bulk-checkin.h"
2526
#include "strvec.h"

builtin/checkout--worker.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
#include "parallel-checkout.h"
77
#include "parse-options.h"
88
#include "pkt-line.h"
9+
#include "read-cache-ll.h"
910

1011
static void packet_to_pc_item(const char *buffer, int len,
1112
struct parallel_checkout_item *pc_item)

builtin/checkout-index.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
#include "parse-options.h"
1717
#include "entry.h"
1818
#include "parallel-checkout.h"
19+
#include "read-cache-ll.h"
1920
#include "setup.h"
2021
#include "sparse-index.h"
2122

builtin/checkout.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
#include "object-store.h"
2222
#include "parse-options.h"
2323
#include "preload-index.h"
24+
#include "read-cache.h"
2425
#include "refs.h"
2526
#include "remote.h"
2627
#include "resolve-undo.h"

builtin/clean.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include "dir.h"
1515
#include "gettext.h"
1616
#include "parse-options.h"
17+
#include "read-cache-ll.h"
1718
#include "repository.h"
1819
#include "setup.h"
1920
#include "string-list.h"

0 commit comments

Comments
 (0)