Browse Source

Merge branch 'en/header-split-cleanup'

Split key function and data structure definitions out of cache.h to
new header files and adjust the users.

* en/header-split-cleanup:
  csum-file.h: remove unnecessary inclusion of cache.h
  write-or-die.h: move declarations for write-or-die.c functions from cache.h
  treewide: remove cache.h inclusion due to setup.h changes
  setup.h: move declarations for setup.c functions from cache.h
  treewide: remove cache.h inclusion due to environment.h changes
  environment.h: move declarations for environment.c functions from cache.h
  treewide: remove unnecessary includes of cache.h
  wrapper.h: move declarations for wrapper.c functions from cache.h
  path.h: move function declarations for path.c functions from cache.h
  cache.h: remove expand_user_path()
  abspath.h: move absolute path functions from cache.h
  environment: move comment_line_char from cache.h
  treewide: remove unnecessary cache.h inclusion from several sources
  treewide: remove unnecessary inclusion of gettext.h
  treewide: be explicit about dependence on gettext.h
  treewide: remove unnecessary cache.h inclusion from a few headers
main
Junio C Hamano 2 years ago
parent
commit
6047b28eb7
  1. 4
      abspath.c
  2. 33
      abspath.h
  3. 1
      add-interactive.c
  4. 2
      add-patch.c
  5. 5
      apply.c
  6. 2
      archive-tar.c
  7. 2
      archive-zip.c
  8. 4
      archive.c
  9. 3
      attr.c
  10. 2
      bisect.c
  11. 2
      blame.c
  12. 2
      branch.c
  13. 1
      builtin/add.c
  14. 4
      builtin/am.c
  15. 1
      builtin/apply.c
  16. 1
      builtin/archive.c
  17. 3
      builtin/bisect.c
  18. 4
      builtin/blame.c
  19. 3
      builtin/branch.c
  20. 5
      builtin/bugreport.c
  21. 3
      builtin/bundle.c
  22. 3
      builtin/cat-file.c
  23. 4
      builtin/check-attr.c
  24. 2
      builtin/check-ignore.c
  25. 2
      builtin/check-mailmap.c
  26. 1
      builtin/check-ref-format.c
  27. 1
      builtin/checkout--worker.c
  28. 2
      builtin/checkout-index.c
  29. 3
      builtin/checkout.c
  30. 3
      builtin/clean.c
  31. 4
      builtin/clone.c
  32. 1
      builtin/column.c
  33. 2
      builtin/commit-graph.c
  34. 1
      builtin/commit-tree.c
  35. 2
      builtin/commit.c
  36. 5
      builtin/config.c
  37. 2
      builtin/count-objects.c
  38. 2
      builtin/credential-cache--daemon.c
  39. 3
      builtin/credential-cache.c
  40. 2
      builtin/credential-store.c
  41. 3
      builtin/describe.c
  42. 2
      builtin/diagnose.c
  43. 1
      builtin/diff-index.c
  44. 1
      builtin/diff-tree.c
  45. 2
      builtin/diff.c
  46. 5
      builtin/difftool.c
  47. 1
      builtin/fast-export.c
  48. 4
      builtin/fast-import.c
  49. 1
      builtin/fetch-pack.c
  50. 2
      builtin/fetch.c
  51. 2
      builtin/fmt-merge-msg.c
  52. 1
      builtin/for-each-ref.c
  53. 1
      builtin/for-each-repo.c
  54. 1
      builtin/fsck.c
  55. 3
      builtin/fsmonitor--daemon.c
  56. 5
      builtin/gc.c
  57. 1
      builtin/get-tar-commit-id.c
  58. 3
      builtin/grep.c
  59. 4
      builtin/hash-object.c
  60. 2
      builtin/help.c
  61. 1
      builtin/hook.c
  62. 4
      builtin/index-pack.c
  63. 5
      builtin/init-db.c
  64. 1
      builtin/interpret-trailers.c
  65. 4
      builtin/log.c
  66. 2
      builtin/ls-files.c
  67. 1
      builtin/ls-remote.c
  68. 1
      builtin/ls-tree.c
  69. 3
      builtin/mailinfo.c
  70. 1
      builtin/mailsplit.c
  71. 1
      builtin/merge-base.c
  72. 3
      builtin/merge-file.c
  73. 1
      builtin/merge-recursive.c
  74. 1
      builtin/merge-tree.c
  75. 4
      builtin/merge.c
  76. 1
      builtin/mktag.c
  77. 1
      builtin/mktree.c
  78. 3
      builtin/multi-pack-index.c
  79. 4
      builtin/mv.c
  80. 2
      builtin/name-rev.c
  81. 2
      builtin/notes.c
  82. 3
      builtin/pack-objects.c
  83. 1
      builtin/pack-redundant.c
  84. 1
      builtin/pack-refs.c
  85. 1
      builtin/patch-id.c
  86. 1
      builtin/prune-packed.c
  87. 2
      builtin/prune.c
  88. 1
      builtin/pull.c
  89. 2
      builtin/push.c
  90. 1
      builtin/range-diff.c
  91. 2
      builtin/read-tree.c
  92. 4
      builtin/rebase.c
  93. 4
      builtin/receive-pack.c
  94. 1
      builtin/reflog.c
  95. 1
      builtin/remote.c
  96. 2
      builtin/repack.c
  97. 2
      builtin/replace.c
  98. 2
      builtin/rerere.c
  99. 3
      builtin/reset.c
  100. 2
      builtin/rev-list.c
  101. Some files were not shown because too many files have changed in this diff Show More

4
abspath.c

@ -1,4 +1,6 @@ @@ -1,4 +1,6 @@
#include "cache.h"
#include "git-compat-util.h"
#include "abspath.h"
#include "strbuf.h"

/*
* Do not use this for inspecting *tracked* content. When path is a

33
abspath.h

@ -0,0 +1,33 @@ @@ -0,0 +1,33 @@
#ifndef ABSPATH_H
#define ABSPATH_H

int is_directory(const char *);
char *strbuf_realpath(struct strbuf *resolved, const char *path,
int die_on_error);
char *strbuf_realpath_forgiving(struct strbuf *resolved, const char *path,
int die_on_error);
char *real_pathdup(const char *path, int die_on_error);
const char *absolute_path(const char *path);
char *absolute_pathdup(const char *path);

/*
* Concatenate "prefix" (if len is non-zero) and "path", with no
* connecting characters (so "prefix" should end with a "/").
* Unlike prefix_path, this should be used if the named file does
* not have to interact with index entry; i.e. name of a random file
* on the filesystem.
*
* The return value is always a newly allocated string (even if the
* prefix was empty).
*/
char *prefix_filename(const char *prefix, const char *path);

/* Likewise, but path=="-" always yields "-" */
char *prefix_filename_except_for_dash(const char *prefix, const char *path);

static inline int is_absolute_path(const char *path)
{
return is_dir_sep(path[0]) || has_dos_drive_prefix(path);
}

#endif /* ABSPATH_H */

1
add-interactive.c

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
#include "color.h"
#include "config.h"
#include "diffcore.h"
#include "gettext.h"
#include "hex.h"
#include "revision.h"
#include "refs.h"

2
add-patch.c

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
#include "cache.h"
#include "add-interactive.h"
#include "alloc.h"
#include "environment.h"
#include "gettext.h"
#include "strbuf.h"
#include "run-command.h"
#include "strvec.h"

5
apply.c

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
*/

#include "cache.h"
#include "abspath.h"
#include "alloc.h"
#include "config.h"
#include "object-store.h"
@ -15,6 +16,8 @@ @@ -15,6 +16,8 @@
#include "delta.h"
#include "diff.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "xdiff-interface.h"
#include "ll-merge.h"
@ -24,6 +27,8 @@ @@ -24,6 +27,8 @@
#include "rerere.h"
#include "apply.h"
#include "entry.h"
#include "setup.h"
#include "wrapper.h"

struct gitdiff_data {
struct strbuf *root;

2
archive-tar.c

@ -4,12 +4,14 @@ @@ -4,12 +4,14 @@
#include "git-compat-util.h"
#include "alloc.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "tar.h"
#include "archive.h"
#include "object-store.h"
#include "streaming.h"
#include "run-command.h"
#include "write-or-die.h"

#define RECORDSIZE (512)
#define BLOCKSIZE (RECORDSIZE * 20)

2
archive-zip.c

@ -4,11 +4,13 @@ @@ -4,11 +4,13 @@
#include "cache.h"
#include "config.h"
#include "archive.h"
#include "gettext.h"
#include "hex.h"
#include "streaming.h"
#include "utf8.h"
#include "object-store.h"
#include "userdiff.h"
#include "write-or-die.h"
#include "xdiff-interface.h"
#include "date.h"


4
archive.c

@ -1,7 +1,11 @@ @@ -1,7 +1,11 @@
#include "git-compat-util.h"
#include "abspath.h"
#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "setup.h"
#include "refs.h"
#include "object-store.h"
#include "commit.h"

3
attr.c

@ -9,13 +9,16 @@ @@ -9,13 +9,16 @@
#include "cache.h"
#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "exec-cmd.h"
#include "attr.h"
#include "dir.h"
#include "gettext.h"
#include "utf8.h"
#include "quote.h"
#include "revision.h"
#include "object-store.h"
#include "setup.h"
#include "thread-utils.h"

const char git_attr__true[] = "(builtin)true";

2
bisect.c

@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
#include "config.h"
#include "commit.h"
#include "diff.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "revision.h"
#include "refs.h"

2
blame.c

@ -5,7 +5,9 @@ @@ -5,7 +5,9 @@
#include "mergesort.h"
#include "diff.h"
#include "diffcore.h"
#include "gettext.h"
#include "hex.h"
#include "setup.h"
#include "tag.h"
#include "blame.h"
#include "alloc.h"

2
branch.c

@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
#include "cache.h"
#include "config.h"
#include "branch.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "refspec.h"

1
builtin/add.c

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
#include "builtin.h"
#include "lockfile.h"
#include "dir.h"
#include "gettext.h"
#include "pathspec.h"
#include "exec-cmd.h"
#include "cache-tree.h"

4
builtin/am.c

@ -5,9 +5,12 @@ @@ -5,9 +5,12 @@
*/
#define USE_THE_INDEX_VARIABLE
#include "cache.h"
#include "abspath.h"
#include "config.h"
#include "builtin.h"
#include "environment.h"
#include "exec-cmd.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
#include "dir.h"
@ -36,6 +39,7 @@ @@ -36,6 +39,7 @@
#include "packfile.h"
#include "repository.h"
#include "pretty.h"
#include "wrapper.h"

/**
* Returns the length of the first line of msg.

1
builtin/apply.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "cache.h"
#include "builtin.h"
#include "gettext.h"
#include "parse-options.h"
#include "apply.h"


1
builtin/archive.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
#include "cache.h"
#include "builtin.h"
#include "archive.h"
#include "gettext.h"
#include "transport.h"
#include "parse-options.h"
#include "pkt-line.h"

3
builtin/bisect.c

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
#include "builtin.h"
#include "cache.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
#include "bisect.h"
@ -10,6 +12,7 @@ @@ -10,6 +12,7 @@
#include "prompt.h"
#include "quote.h"
#include "revision.h"
#include "wrapper.h"

static GIT_PATH_FUNC(git_path_bisect_terms, "BISECT_TERMS")
static GIT_PATH_FUNC(git_path_bisect_expected_rev, "BISECT_EXPECTED_REV")

4
builtin/blame.c

@ -10,6 +10,8 @@ @@ -10,6 +10,8 @@
#include "config.h"
#include "color.h"
#include "builtin.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "repository.h"
#include "commit.h"
@ -29,7 +31,9 @@ @@ -29,7 +31,9 @@
#include "object-store.h"
#include "blame.h"
#include "refs.h"
#include "setup.h"
#include "tag.h"
#include "write-or-die.h"

static char blame_usage[] = N_("git blame [<options>] [<rev-opts>] [<rev>] [--] <file>");
static char annotate_usage[] = N_("git annotate [<options>] [<rev-opts>] [<rev>] [--] <file>");

3
builtin/branch.c

@ -8,9 +8,11 @@ @@ -8,9 +8,11 @@
#include "cache.h"
#include "config.h"
#include "color.h"
#include "environment.h"
#include "refs.h"
#include "commit.h"
#include "builtin.h"
#include "gettext.h"
#include "remote.h"
#include "parse-options.h"
#include "branch.h"
@ -24,6 +26,7 @@ @@ -24,6 +26,7 @@
#include "worktree.h"
#include "help.h"
#include "commit-reach.h"
#include "wrapper.h"

static const char * const builtin_branch_usage[] = {
N_("git branch [<options>] [-r | -a] [--merged] [--no-merged]"),

5
builtin/bugreport.c

@ -1,4 +1,6 @@ @@ -1,4 +1,6 @@
#include "builtin.h"
#include "abspath.h"
#include "gettext.h"
#include "parse-options.h"
#include "strbuf.h"
#include "help.h"
@ -6,7 +8,8 @@ @@ -6,7 +8,8 @@
#include "hook.h"
#include "hook-list.h"
#include "diagnose.h"

#include "setup.h"
#include "wrapper.h"

static void get_system_info(struct strbuf *sys_info)
{

3
builtin/bundle.c

@ -1,4 +1,7 @@ @@ -1,4 +1,7 @@
#include "builtin.h"
#include "abspath.h"
#include "gettext.h"
#include "setup.h"
#include "strvec.h"
#include "parse-options.h"
#include "cache.h"

3
builtin/cat-file.c

@ -9,6 +9,8 @@ @@ -9,6 +9,8 @@
#include "config.h"
#include "builtin.h"
#include "diff.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "ident.h"
#include "parse-options.h"
@ -21,6 +23,7 @@ @@ -21,6 +23,7 @@
#include "replace-object.h"
#include "promisor-remote.h"
#include "mailmap.h"
#include "write-or-die.h"

enum batch_mode {
BATCH_MODE_CONTENTS,

4
builtin/check-attr.c

@ -3,8 +3,12 @@ @@ -3,8 +3,12 @@
#include "cache.h"
#include "config.h"
#include "attr.h"
#include "environment.h"
#include "gettext.h"
#include "quote.h"
#include "setup.h"
#include "parse-options.h"
#include "write-or-die.h"

static int all_attrs;
static int cached_attrs;

2
builtin/check-ignore.c

@ -3,10 +3,12 @@ @@ -3,10 +3,12 @@
#include "cache.h"
#include "config.h"
#include "dir.h"
#include "gettext.h"
#include "quote.h"
#include "pathspec.h"
#include "parse-options.h"
#include "submodule.h"
#include "write-or-die.h"

static int quiet, verbose, stdin_paths, show_non_matching, no_index;
static const char * const check_ignore_usage[] = {

2
builtin/check-mailmap.c

@ -1,9 +1,11 @@ @@ -1,9 +1,11 @@
#include "builtin.h"
#include "config.h"
#include "gettext.h"
#include "ident.h"
#include "mailmap.h"
#include "parse-options.h"
#include "string-list.h"
#include "write-or-die.h"

static int use_stdin;
static const char * const check_mailmap_usage[] = {

1
builtin/check-ref-format.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
#include "cache.h"
#include "refs.h"
#include "builtin.h"
#include "setup.h"
#include "strbuf.h"

static const char builtin_check_ref_format_usage[] =

1
builtin/checkout--worker.c

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
#include "alloc.h"
#include "config.h"
#include "entry.h"
#include "gettext.h"
#include "parallel-checkout.h"
#include "parse-options.h"
#include "pkt-line.h"

2
builtin/checkout-index.c

@ -8,12 +8,14 @@ @@ -8,12 +8,14 @@
#include "builtin.h"
#include "config.h"
#include "dir.h"
#include "gettext.h"
#include "lockfile.h"
#include "quote.h"
#include "cache-tree.h"
#include "parse-options.h"
#include "entry.h"
#include "parallel-checkout.h"
#include "setup.h"

#define CHECKOUT_ALL 4
static int nul_term_line;

3
builtin/checkout.c

@ -9,6 +9,8 @@ @@ -9,6 +9,8 @@
#include "config.h"
#include "diff.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "hook.h"
#include "ll-merge.h"
@ -21,6 +23,7 @@ @@ -21,6 +23,7 @@
#include "resolve-undo.h"
#include "revision.h"
#include "run-command.h"
#include "setup.h"
#include "submodule.h"
#include "submodule-config.h"
#include "tree.h"

3
builtin/clean.c

@ -8,10 +8,13 @@ @@ -8,10 +8,13 @@

#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "abspath.h"
#include "cache.h"
#include "config.h"
#include "dir.h"
#include "gettext.h"
#include "parse-options.h"
#include "setup.h"
#include "string-list.h"
#include "quote.h"
#include "column.h"

4
builtin/clone.c

@ -10,7 +10,10 @@ @@ -10,7 +10,10 @@

#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "abspath.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
#include "parse-options.h"
@ -30,6 +33,7 @@ @@ -30,6 +33,7 @@
#include "branch.h"
#include "remote.h"
#include "run-command.h"
#include "setup.h"
#include "connected.h"
#include "packfile.h"
#include "list-objects-filter-options.h"

1
builtin/column.c

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "strbuf.h"
#include "parse-options.h"
#include "string-list.h"

2
builtin/commit-graph.c

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
#include "builtin.h"
#include "config.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
#include "parse-options.h"

1
builtin/commit-tree.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
*/
#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "object-store.h"
#include "repository.h"

2
builtin/commit.c

@ -12,10 +12,12 @@ @@ -12,10 +12,12 @@
#include "cache-tree.h"
#include "color.h"
#include "dir.h"
#include "environment.h"
#include "builtin.h"
#include "diff.h"
#include "diffcore.h"
#include "commit.h"
#include "gettext.h"
#include "revision.h"
#include "wt-status.h"
#include "run-command.h"

5
builtin/config.c

@ -1,12 +1,17 @@ @@ -1,12 +1,17 @@
#include "builtin.h"
#include "abspath.h"
#include "alloc.h"
#include "config.h"
#include "color.h"
#include "environment.h"
#include "gettext.h"
#include "ident.h"
#include "parse-options.h"
#include "urlmatch.h"
#include "quote.h"
#include "setup.h"
#include "worktree.h"
#include "wrapper.h"

static const char *const builtin_config_usage[] = {
N_("git config [<options>]"),

2
builtin/count-objects.c

@ -7,6 +7,8 @@ @@ -7,6 +7,8 @@
#include "cache.h"
#include "config.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "repository.h"
#include "builtin.h"
#include "parse-options.h"

2
builtin/credential-cache--daemon.c

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
#include "builtin.h"
#include "abspath.h"
#include "alloc.h"
#include "gettext.h"
#include "parse-options.h"

#ifndef NO_UNIX_SOCKETS

3
builtin/credential-cache.c

@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
#include "builtin.h"
#include "gettext.h"
#include "parse-options.h"
#include "wrapper.h"
#include "write-or-die.h"

#ifndef NO_UNIX_SOCKETS


2
builtin/credential-store.c

@ -1,9 +1,11 @@ @@ -1,9 +1,11 @@
#include "builtin.h"
#include "config.h"
#include "gettext.h"
#include "lockfile.h"
#include "credential.h"
#include "string-list.h"
#include "parse-options.h"
#include "write-or-die.h"

static struct lock_file credential_lock;


3
builtin/describe.c

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
#define USE_THE_INDEX_VARIABLE
#include "cache.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
#include "commit.h"
@ -13,6 +15,7 @@ @@ -13,6 +15,7 @@
#include "revision.h"
#include "diff.h"
#include "hashmap.h"
#include "setup.h"
#include "strvec.h"
#include "run-command.h"
#include "object-store.h"

2
builtin/diagnose.c

@ -1,4 +1,6 @@ @@ -1,4 +1,6 @@
#include "builtin.h"
#include "abspath.h"
#include "gettext.h"
#include "parse-options.h"
#include "diagnose.h"


1
builtin/diff-index.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
#include "commit.h"
#include "revision.h"
#include "builtin.h"
#include "setup.h"
#include "submodule.h"

static const char diff_cache_usage[] =

1
builtin/diff-tree.c

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
#include "config.h"
#include "diff.h"
#include "commit.h"
#include "gettext.h"
#include "hex.h"
#include "log-tree.h"
#include "builtin.h"

2
builtin/diff.c

@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
#include "color.h"
#include "commit.h"
#include "blob.h"
#include "gettext.h"
#include "tag.h"
#include "diff.h"
#include "diff-merges.h"
@ -18,6 +19,7 @@ @@ -18,6 +19,7 @@
#include "revision.h"
#include "log-tree.h"
#include "builtin.h"
#include "setup.h"
#include "submodule.h"
#include "oid-array.h"


5
builtin/difftool.c

@ -13,10 +13,13 @@ @@ -13,10 +13,13 @@
*/
#define USE_THE_INDEX_VARIABLE
#include "cache.h"
#include "abspath.h"
#include "config.h"
#include "builtin.h"
#include "run-command.h"
#include "environment.h"
#include "exec-cmd.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
#include "strvec.h"
@ -25,6 +28,8 @@ @@ -25,6 +28,8 @@
#include "object-store.h"
#include "dir.h"
#include "entry.h"
#include "setup.h"
#include "wrapper.h"

static int trust_exit_code;


1
builtin/fast-export.c

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "refspec.h"

4
builtin/fast-import.c

@ -1,5 +1,8 @@ @@ -1,5 +1,8 @@
#include "builtin.h"
#include "abspath.h"
#include "cache.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "repository.h"
#include "config.h"
@ -21,6 +24,7 @@ @@ -21,6 +24,7 @@
#include "commit-reach.h"
#include "khash.h"
#include "date.h"
#include "wrapper.h"

#define PACK_ID_BITS 16
#define MAX_PACK_ID ((1<<PACK_ID_BITS)-1)

1
builtin/fetch-pack.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "alloc.h"
#include "gettext.h"
#include "hex.h"
#include "pkt-line.h"
#include "fetch-pack.h"

2
builtin/fetch.c

@ -3,6 +3,8 @@ @@ -3,6 +3,8 @@
*/
#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "environment.h"
#include "hex.h"
#include "repository.h"
#include "refs.h"

2
builtin/fmt-merge-msg.c

@ -1,7 +1,9 @@ @@ -1,7 +1,9 @@
#include "builtin.h"
#include "config.h"
#include "fmt-merge-msg.h"
#include "gettext.h"
#include "parse-options.h"
#include "wrapper.h"

static const char * const fmt_merge_msg_usage[] = {
N_("git fmt-merge-msg [-m <message>] [--log[=<n>] | --no-log] [--file <file>]"),

1
builtin/for-each-ref.c

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "refs.h"
#include "object.h"
#include "parse-options.h"

1
builtin/for-each-repo.c

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "gettext.h"
#include "parse-options.h"
#include "run-command.h"
#include "string-list.h"

1
builtin/fsck.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "gettext.h"
#include "hex.h"
#include "repository.h"
#include "config.h"

3
builtin/fsmonitor--daemon.c

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
#include "builtin.h"
#include "abspath.h"
#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
#include "fsmonitor.h"
#include "fsmonitor-ipc.h"

5
builtin/gc.c

@ -11,6 +11,8 @@ @@ -11,6 +11,8 @@
*/

#include "builtin.h"
#include "abspath.h"
#include "environment.h"
#include "hex.h"
#include "repository.h"
#include "config.h"
@ -32,7 +34,10 @@ @@ -32,7 +34,10 @@
#include "refs.h"
#include "remote.h"
#include "exec-cmd.h"
#include "gettext.h"
#include "hook.h"
#include "setup.h"
#include "wrapper.h"

#define FAILED_RUN "failed to run %s"


1
builtin/get-tar-commit-id.c

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
#include "tar.h"
#include "builtin.h"
#include "quote.h"
#include "wrapper.h"

static const char builtin_get_tar_commit_id_usage[] =
"git get-tar-commit-id";

3
builtin/grep.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
*/
#include "cache.h"
#include "alloc.h"
#include "gettext.h"
#include "hex.h"
#include "repository.h"
#include "config.h"
@ -22,10 +23,12 @@ @@ -22,10 +23,12 @@
#include "quote.h"
#include "dir.h"
#include "pathspec.h"
#include "setup.h"
#include "submodule.h"
#include "submodule-config.h"
#include "object-store.h"
#include "packfile.h"
#include "write-or-die.h"

static const char *grep_prefix;


4
builtin/hash-object.c

@ -5,13 +5,17 @@ @@ -5,13 +5,17 @@
* Copyright (C) Junio C Hamano, 2005
*/
#include "builtin.h"
#include "abspath.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "object-store.h"
#include "blob.h"
#include "quote.h"
#include "parse-options.h"
#include "exec-cmd.h"
#include "setup.h"
#include "write-or-die.h"

/*
* This is to create corrupt objects for debugging and as such it

2
builtin/help.c

@ -5,11 +5,13 @@ @@ -5,11 +5,13 @@
#include "config.h"
#include "builtin.h"
#include "exec-cmd.h"
#include "gettext.h"
#include "parse-options.h"
#include "run-command.h"
#include "config-list.h"
#include "help.h"
#include "alias.h"
#include "setup.h"

#ifndef DEFAULT_HELP_FORMAT
#define DEFAULT_HELP_FORMAT "man"

1
builtin/hook.c

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
#include "cache.h"
#include "builtin.h"
#include "config.h"
#include "gettext.h"
#include "hook.h"
#include "parse-options.h"
#include "strbuf.h"

4
builtin/index-pack.c

@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
#include "alloc.h"
#include "config.h"
#include "delta.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "pack.h"
#include "csum-file.h"
@ -18,6 +20,8 @@ @@ -18,6 +20,8 @@
#include "object-store.h"
#include "replace-object.h"
#include "promisor-remote.h"
#include "setup.h"
#include "wrapper.h"

static const char index_pack_usage[] =
"git index-pack [-v] [-o <index-file>] [--keep | --keep=<msg>] [--[no-]rev-index] [--verify] [--strict] (<pack-file> | --stdin [--fix-thin] [<pack-file>])";

5
builtin/init-db.c

@ -4,12 +4,17 @@ @@ -4,12 +4,17 @@
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
#include "abspath.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "refs.h"
#include "builtin.h"
#include "exec-cmd.h"
#include "parse-options.h"
#include "setup.h"
#include "worktree.h"
#include "wrapper.h"

#ifndef DEFAULT_GIT_TEMPLATE_DIR
#define DEFAULT_GIT_TEMPLATE_DIR "/usr/share/git-core/templates"

1
builtin/interpret-trailers.c

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@

#include "cache.h"
#include "builtin.h"
#include "gettext.h"
#include "parse-options.h"
#include "string-list.h"
#include "trailer.h"

4
builtin/log.c

@ -5,8 +5,11 @@ @@ -5,8 +5,11 @@
* 2006 Junio Hamano
*/
#include "git-compat-util.h"
#include "abspath.h"
#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "object-store.h"
@ -37,6 +40,7 @@ @@ -37,6 +40,7 @@
#include "commit-reach.h"
#include "range-diff.h"
#include "tmp-objdir.h"
#include "write-or-die.h"

#define MAIL_DEFAULT_WRAP 72
#define COVER_FROM_AUTO_MAX_SUBJECT_LEN 100

2
builtin/ls-files.c

@ -11,6 +11,7 @@ @@ -11,6 +11,7 @@
#include "quote.h"
#include "dir.h"
#include "builtin.h"
#include "gettext.h"
#include "strbuf.h"
#include "tree.h"
#include "cache-tree.h"
@ -19,6 +20,7 @@ @@ -19,6 +20,7 @@
#include "string-list.h"
#include "pathspec.h"
#include "run-command.h"
#include "setup.h"
#include "submodule.h"
#include "submodule-config.h"


1
builtin/ls-remote.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "gettext.h"
#include "hex.h"
#include "transport.h"
#include "ref-filter.h"

1
builtin/ls-tree.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
*/
#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "object-store.h"
#include "blob.h"

3
builtin/mailinfo.c

@ -3,7 +3,10 @@ @@ -3,7 +3,10 @@
* email to figure out authorship and subject
*/
#include "cache.h"
#include "abspath.h"
#include "builtin.h"
#include "environment.h"
#include "gettext.h"
#include "utf8.h"
#include "strbuf.h"
#include "mailinfo.h"

1
builtin/mailsplit.c

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
*/
#include "cache.h"
#include "builtin.h"
#include "gettext.h"
#include "string-list.h"
#include "strbuf.h"


1
builtin/merge-base.c

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
#include "cache.h"
#include "config.h"
#include "commit.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "diff.h"

3
builtin/merge-file.c

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
#include "builtin.h"
#include "abspath.h"
#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "setup.h"
#include "xdiff/xdiff.h"
#include "xdiff-interface.h"
#include "parse-options.h"

1
builtin/merge-recursive.c

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
#include "cache.h"
#include "builtin.h"
#include "commit.h"
#include "gettext.h"
#include "tag.h"
#include "merge-recursive.h"
#include "xdiff-interface.h"

1
builtin/merge-tree.c

@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
#include "tree-walk.h"
#include "xdiff-interface.h"
#include "help.h"
#include "gettext.h"
#include "hex.h"
#include "commit.h"
#include "commit-reach.h"

4
builtin/merge.c

@ -8,8 +8,11 @@ @@ -8,8 +8,11 @@

#define USE_THE_INDEX_VARIABLE
#include "cache.h"
#include "abspath.h"
#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
#include "builtin.h"
@ -46,6 +49,7 @@ @@ -46,6 +49,7 @@
#include "commit-reach.h"
#include "wt-status.h"
#include "commit-graph.h"
#include "wrapper.h"

#define DEFAULT_TWOHEAD (1<<0)
#define DEFAULT_OCTOPUS (1<<1)

1
builtin/mktag.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "builtin.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
#include "tag.h"

1
builtin/mktree.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
*/
#include "builtin.h"
#include "alloc.h"
#include "gettext.h"
#include "hex.h"
#include "quote.h"
#include "tree.h"

3
builtin/multi-pack-index.c

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
#include "builtin.h"
#include "abspath.h"
#include "cache.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "parse-options.h"
#include "midx.h"
#include "trace2.h"

4
builtin/mv.c

@ -5,14 +5,18 @@ @@ -5,14 +5,18 @@
*/
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "abspath.h"
#include "alloc.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "pathspec.h"
#include "lockfile.h"
#include "dir.h"
#include "cache-tree.h"
#include "string-list.h"
#include "parse-options.h"
#include "setup.h"
#include "submodule.h"
#include "entry.h"


2
builtin/name-rev.c

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
#include "builtin.h"
#include "alloc.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "repository.h"
#include "config.h"

2
builtin/notes.c

@ -10,6 +10,7 @@ @@ -10,6 +10,7 @@
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "gettext.h"
#include "hex.h"
#include "notes.h"
#include "object-store.h"
@ -24,6 +25,7 @@ @@ -24,6 +25,7 @@
#include "notes-merge.h"
#include "notes-utils.h"
#include "worktree.h"
#include "write-or-die.h"

static const char * const git_notes_usage[] = {
N_("git notes [--ref <notes-ref>] [list [<object>]]"),

3
builtin/pack-objects.c

@ -1,5 +1,7 @@ @@ -1,5 +1,7 @@
#include "builtin.h"
#include "alloc.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "repository.h"
#include "config.h"
@ -40,6 +42,7 @@ @@ -40,6 +42,7 @@
#include "promisor-remote.h"
#include "pack-mtimes.h"
#include "parse-options.h"
#include "wrapper.h"

/*
* Objects we are going to pack are collected in the `to_pack` structure.

1
builtin/pack-redundant.c

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
*/

#include "builtin.h"
#include "gettext.h"
#include "hex.h"
#include "repository.h"
#include "packfile.h"

1
builtin/pack-refs.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "config.h"
#include "gettext.h"
#include "parse-options.h"
#include "refs.h"
#include "repository.h"

1
builtin/patch-id.c

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
#include "builtin.h"
#include "config.h"
#include "diff.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"


1
builtin/prune-packed.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "builtin.h"
#include "gettext.h"
#include "parse-options.h"
#include "prune-packed.h"


2
builtin/prune.c

@ -1,6 +1,8 @@ @@ -1,6 +1,8 @@
#include "cache.h"
#include "commit.h"
#include "diff.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "revision.h"
#include "builtin.h"

1
builtin/pull.c

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
#include "exec-cmd.h"

2
builtin/push.c

@ -4,6 +4,8 @@ @@ -4,6 +4,8 @@
#include "cache.h"
#include "branch.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "refs.h"
#include "refspec.h"
#include "run-command.h"

1
builtin/range-diff.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "cache.h"
#include "builtin.h"
#include "gettext.h"
#include "parse-options.h"
#include "range-diff.h"
#include "config.h"

2
builtin/read-tree.c

@ -7,6 +7,7 @@ @@ -7,6 +7,7 @@
#define USE_THE_INDEX_VARIABLE
#include "cache.h"
#include "config.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
#include "object.h"
@ -18,6 +19,7 @@ @@ -18,6 +19,7 @@
#include "builtin.h"
#include "parse-options.h"
#include "resolve-undo.h"
#include "setup.h"
#include "submodule.h"
#include "submodule-config.h"


4
builtin/rebase.c

@ -6,6 +6,9 @@ @@ -6,6 +6,9 @@

#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "abspath.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "run-command.h"
#include "exec-cmd.h"
@ -30,6 +33,7 @@ @@ -30,6 +33,7 @@
#include "rebase-interactive.h"
#include "reset.h"
#include "hook.h"
#include "wrapper.h"

static char const * const builtin_rebase_usage[] = {
N_("git rebase [-i] [options] [--exec <cmd>] "

4
builtin/receive-pack.c

@ -1,6 +1,9 @@ @@ -1,6 +1,9 @@
#include "builtin.h"
#include "abspath.h"
#include "repository.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
#include "pack.h"
@ -32,6 +35,7 @@ @@ -32,6 +35,7 @@
#include "worktree.h"
#include "shallow.h"
#include "parse-options.h"
#include "wrapper.h"

static const char * const receive_pack_usage[] = {
N_("git receive-pack <git-dir>"),

1
builtin/reflog.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "config.h"
#include "gettext.h"
#include "revision.h"
#include "reachable.h"
#include "worktree.h"

1
builtin/remote.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "config.h"
#include "gettext.h"
#include "parse-options.h"
#include "transport.h"
#include "remote.h"

2
builtin/repack.c

@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
#include "alloc.h"
#include "config.h"
#include "dir.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "parse-options.h"
#include "run-command.h"

2
builtin/replace.c

@ -11,6 +11,8 @@ @@ -11,6 +11,8 @@
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "refs.h"
#include "parse-options.h"

2
builtin/rerere.c

@ -2,9 +2,11 @@ @@ -2,9 +2,11 @@
#include "cache.h"
#include "config.h"
#include "dir.h"
#include "gettext.h"
#include "parse-options.h"
#include "string-list.h"
#include "rerere.h"
#include "wrapper.h"
#include "xdiff/xdiff.h"
#include "xdiff-interface.h"
#include "pathspec.h"

3
builtin/reset.c

@ -10,6 +10,8 @@ @@ -10,6 +10,8 @@
#define USE_THE_INDEX_VARIABLE
#include "builtin.h"
#include "config.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "lockfile.h"
#include "tag.h"
@ -24,6 +26,7 @@ @@ -24,6 +26,7 @@
#include "parse-options.h"
#include "unpack-trees.h"
#include "cache-tree.h"
#include "setup.h"
#include "submodule.h"
#include "submodule-config.h"
#include "dir.h"

2
builtin/rev-list.c

@ -2,6 +2,8 @@ @@ -2,6 +2,8 @@
#include "config.h"
#include "commit.h"
#include "diff.h"
#include "environment.h"
#include "gettext.h"
#include "hex.h"
#include "revision.h"
#include "list-objects.h"

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save