Skip to content

Commit 833c9cf

Browse files
committed
builtin: use builtin.h for all builtin commands
Change the builtin/*.c files and wt-status.c files which weren't using builtin.h to use it, also remove any git-compat-util.h, strbuf.h and cache.h from those files. We can trust on builtin.h including them. builtin.h also includes commit.h and notes.h. But I haven't removed these includes. They're redundant now, but we may want to remove them from builtin.h in the future. This impeded my efforts to gettextize git, since I'd otherwise have to add gettext.h to all of these. Using builtin.h is a good idea in any case, since it's defining the prototypes for the cmd_* functions that these files define. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
1 parent b49c452 commit 833c9cf

18 files changed

+18
-20
lines changed

builtin/clone.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,14 @@
88
* Clone a repository into a different directory that does not yet exist.
99
*/
1010

11-
#include "cache.h"
11+
#include "builtin.h"
1212
#include "parse-options.h"
1313
#include "fetch-pack.h"
1414
#include "refs.h"
1515
#include "tree.h"
1616
#include "tree-walk.h"
1717
#include "unpack-trees.h"
1818
#include "transport.h"
19-
#include "strbuf.h"
2019
#include "dir.h"
2120
#include "pack-refs.h"
2221
#include "sigchain.h"

builtin/fetch-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "builtin.h"
22
#include "refs.h"
33
#include "pkt-line.h"
44
#include "commit.h"

builtin/hash-object.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Copyright (C) Linus Torvalds, 2005
55
* Copyright (C) Junio C Hamano, 2005
66
*/
7-
#include "cache.h"
7+
#include "builtin.h"
88
#include "blob.h"
99
#include "quote.h"
1010
#include "parse-options.h"

builtin/index-pack.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "builtin.h"
22
#include "delta.h"
33
#include "pack.h"
44
#include "csum-file.h"

builtin/merge-index.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "builtin.h"
22
#include "run-command.h"
33
#include "exec_cmd.h"
44

builtin/merge-recursive.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "builtin.h"
22
#include "commit.h"
33
#include "tag.h"
44
#include "merge-recursive.h"

builtin/merge-tree.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "builtin.h"
22
#include "tree-walk.h"
33
#include "xdiff-interface.h"
44
#include "blob.h"

builtin/mktag.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "builtin.h"
22
#include "tag.h"
33
#include "exec_cmd.h"
44

builtin/pack-redundant.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
*/
88

9-
#include "cache.h"
9+
#include "builtin.h"
1010
#include "exec_cmd.h"
1111

1212
#define BLKSIZE 512

builtin/pack-refs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#include "cache.h"
1+
#include "builtin.h"
22
#include "parse-options.h"
33
#include "pack-refs.h"
44

0 commit comments

Comments
 (0)