Browse Source

Merge branch 'bw/config-h'

Fix configuration codepath to pay proper attention to commondir
that is used in multi-worktree situation, and isolate config API
into its own header file.

* bw/config-h:
  config: don't implicitly use gitdir or commondir
  config: respect commondir
  setup: teach discover_git_directory to respect the commondir
  config: don't include config.h by default
  config: remove git_config_iter
  config: create config.h
maint
Junio C Hamano 8 years ago
parent
commit
f31d23a399
  1. 1
      advice.c
  2. 1
      alias.c
  3. 1
      apply.c
  4. 1
      archive-tar.c
  5. 1
      archive-zip.c
  6. 1
      archive.c
  7. 1
      attr.c
  8. 1
      bisect.c
  9. 1
      branch.c
  10. 1
      builtin/add.c
  11. 1
      builtin/am.c
  12. 1
      builtin/blame.c
  13. 1
      builtin/branch.c
  14. 1
      builtin/cat-file.c
  15. 1
      builtin/check-attr.c
  16. 1
      builtin/check-ignore.c
  17. 1
      builtin/check-mailmap.c
  18. 1
      builtin/checkout-index.c
  19. 1
      builtin/checkout.c
  20. 1
      builtin/clean.c
  21. 1
      builtin/clone.c
  22. 1
      builtin/column.c
  23. 1
      builtin/commit-tree.c
  24. 1
      builtin/commit.c
  25. 27
      builtin/config.c
  26. 1
      builtin/count-objects.c
  27. 1
      builtin/describe.c
  28. 1
      builtin/diff-files.c
  29. 1
      builtin/diff-index.c
  30. 1
      builtin/diff-tree.c
  31. 1
      builtin/diff.c
  32. 1
      builtin/difftool.c
  33. 1
      builtin/fast-export.c
  34. 1
      builtin/fetch.c
  35. 1
      builtin/fmt-merge-msg.c
  36. 1
      builtin/for-each-ref.c
  37. 1
      builtin/fsck.c
  38. 1
      builtin/gc.c
  39. 1
      builtin/grep.c
  40. 1
      builtin/hash-object.c
  41. 1
      builtin/help.c
  42. 1
      builtin/index-pack.c
  43. 1
      builtin/init-db.c
  44. 1
      builtin/log.c
  45. 1
      builtin/ls-files.c
  46. 1
      builtin/ls-tree.c
  47. 1
      builtin/merge-base.c
  48. 1
      builtin/merge-file.c
  49. 1
      builtin/merge.c
  50. 1
      builtin/mv.c
  51. 1
      builtin/name-rev.c
  52. 1
      builtin/notes.c
  53. 1
      builtin/pack-objects.c
  54. 1
      builtin/patch-id.c
  55. 1
      builtin/pull.c
  56. 1
      builtin/push.c
  57. 1
      builtin/read-tree.c
  58. 1
      builtin/rebase--helper.c
  59. 1
      builtin/receive-pack.c
  60. 1
      builtin/reflog.c
  61. 1
      builtin/remote.c
  62. 1
      builtin/repack.c
  63. 1
      builtin/replace.c
  64. 1
      builtin/rerere.c
  65. 1
      builtin/reset.c
  66. 1
      builtin/rev-list.c
  67. 1
      builtin/rev-parse.c
  68. 1
      builtin/revert.c
  69. 1
      builtin/rm.c
  70. 1
      builtin/send-pack.c
  71. 1
      builtin/shortlog.c
  72. 1
      builtin/show-branch.c
  73. 1
      builtin/stripspace.c
  74. 1
      builtin/submodule--helper.c
  75. 1
      builtin/symbolic-ref.c
  76. 1
      builtin/tag.c
  77. 1
      builtin/unpack-file.c
  78. 1
      builtin/unpack-objects.c
  79. 1
      builtin/update-index.c
  80. 1
      builtin/update-ref.c
  81. 1
      builtin/update-server-info.c
  82. 1
      builtin/var.c
  83. 1
      builtin/verify-commit.c
  84. 1
      builtin/verify-pack.c
  85. 1
      builtin/verify-tag.c
  86. 1
      builtin/worktree.c
  87. 1
      builtin/write-tree.c
  88. 204
      cache.h
  89. 1
      color.c
  90. 1
      column.c
  91. 1
      compat/precompose_utf8.c
  92. 41
      config.c
  93. 194
      config.h
  94. 1
      connect.c
  95. 1
      convert.c
  96. 1
      credential-cache--daemon.c
  97. 1
      credential.c
  98. 1
      daemon.c
  99. 1
      diff.c
  100. 1
      dir.c
  101. Some files were not shown because too many files have changed in this diff Show More

1
advice.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"

int advice_push_update_rejected = 1;
int advice_push_non_ff_current = 1;

1
alias.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"

struct config_alias_data {
const char *alias;

1
apply.c

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

#include "cache.h"
#include "config.h"
#include "blob.h"
#include "delta.h"
#include "diff.h"

1
archive-tar.c

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
* Copyright (c) 2005, 2006 Rene Scharfe
*/
#include "cache.h"
#include "config.h"
#include "tar.h"
#include "archive.h"
#include "streaming.h"

1
archive-zip.c

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
* Copyright (c) 2006 Rene Scharfe
*/
#include "cache.h"
#include "config.h"
#include "archive.h"
#include "streaming.h"
#include "utf8.h"

1
archive.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "refs.h"
#include "commit.h"
#include "tree-walk.h"

1
attr.c

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

#define NO_THE_INDEX_COMPATIBILITY_MACROS
#include "cache.h"
#include "config.h"
#include "exec_cmd.h"
#include "attr.h"
#include "dir.h"

1
bisect.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "commit.h"
#include "diff.h"
#include "revision.h"

1
branch.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "cache.h"
#include "config.h"
#include "branch.h"
#include "refs.h"
#include "remote.h"

1
builtin/add.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (C) 2006 Linus Torvalds
*/
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "lockfile.h"
#include "dir.h"

1
builtin/am.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Based on git-am.sh by Junio C Hamano.
*/
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "exec_cmd.h"
#include "parse-options.h"

1
builtin/blame.c

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

#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "commit.h"
#include "diff.h"

1
builtin/branch.c

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

#include "cache.h"
#include "config.h"
#include "color.h"
#include "refs.h"
#include "commit.h"

1
builtin/cat-file.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "diff.h"
#include "parse-options.h"

1
builtin/check-attr.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "attr.h"
#include "quote.h"
#include "parse-options.h"

1
builtin/check-ignore.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "dir.h"
#include "quote.h"
#include "pathspec.h"

1
builtin/check-mailmap.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "builtin.h"
#include "config.h"
#include "mailmap.h"
#include "parse-options.h"
#include "string-list.h"

1
builtin/checkout-index.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
*
*/
#include "builtin.h"
#include "config.h"
#include "lockfile.h"
#include "quote.h"
#include "cache-tree.h"

1
builtin/checkout.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "builtin.h"
#include "config.h"
#include "lockfile.h"
#include "parse-options.h"
#include "refs.h"

1
builtin/clean.c

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

#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "dir.h"
#include "parse-options.h"
#include "string-list.h"

1
builtin/clone.c

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

#include "builtin.h"
#include "config.h"
#include "lockfile.h"
#include "parse-options.h"
#include "fetch-pack.h"

1
builtin/column.c

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

1
builtin/commit-tree.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
#include "config.h"
#include "commit.h"
#include "tree.h"
#include "builtin.h"

1
builtin/commit.c

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

#include "cache.h"
#include "config.h"
#include "lockfile.h"
#include "cache-tree.h"
#include "color.h"

27
builtin/config.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "color.h"
#include "parse-options.h"
#include "urlmatch.h"
@ -242,8 +243,8 @@ static int get_value(const char *key_, const char *regex_) @@ -242,8 +243,8 @@ static int get_value(const char *key_, const char *regex_)
}
}

git_config_with_options(collect_config, &values,
&given_config_source, &config_options);
config_with_options(collect_config, &values,
&given_config_source, &config_options);

ret = !values.nr;

@ -320,8 +321,8 @@ static void get_color(const char *var, const char *def_color) @@ -320,8 +321,8 @@ static void get_color(const char *var, const char *def_color)
get_color_slot = var;
get_color_found = 0;
parsed_color[0] = '\0';
git_config_with_options(git_get_color_config, NULL,
&given_config_source, &config_options);
config_with_options(git_get_color_config, NULL,
&given_config_source, &config_options);

if (!get_color_found && def_color) {
if (color_parse(def_color, parsed_color) < 0)
@ -352,8 +353,8 @@ static int get_colorbool(const char *var, int print) @@ -352,8 +353,8 @@ static int get_colorbool(const char *var, int print)
get_colorbool_found = -1;
get_diff_color_found = -1;
get_color_ui_found = -1;
git_config_with_options(git_get_colorbool_config, NULL,
&given_config_source, &config_options);
config_with_options(git_get_colorbool_config, NULL,
&given_config_source, &config_options);

if (get_colorbool_found < 0) {
if (!strcmp(get_colorbool_slot, "color.diff"))
@ -441,8 +442,8 @@ static int get_urlmatch(const char *var, const char *url) @@ -441,8 +442,8 @@ static int get_urlmatch(const char *var, const char *url)
show_keys = 1;
}

git_config_with_options(urlmatch_config_entry, &config,
&given_config_source, &config_options);
config_with_options(urlmatch_config_entry, &config,
&given_config_source, &config_options);

ret = !values.nr;

@ -538,6 +539,10 @@ int cmd_config(int argc, const char **argv, const char *prefix) @@ -538,6 +539,10 @@ int cmd_config(int argc, const char **argv, const char *prefix)
config_options.respect_includes = !given_config_source.file;
else
config_options.respect_includes = respect_includes_opt;
if (!nongit) {
config_options.commondir = get_git_common_dir();
config_options.git_dir = get_git_dir();
}

if (end_null) {
term = '\0';
@ -582,9 +587,9 @@ int cmd_config(int argc, const char **argv, const char *prefix) @@ -582,9 +587,9 @@ int cmd_config(int argc, const char **argv, const char *prefix)

if (actions == ACTION_LIST) {
check_argc(argc, 0, 0);
if (git_config_with_options(show_all_config, NULL,
&given_config_source,
&config_options) < 0) {
if (config_with_options(show_all_config, NULL,
&given_config_source,
&config_options) < 0) {
if (given_config_source.file)
die_errno("unable to read config file '%s'",
given_config_source.file);

1
builtin/count-objects.c

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

#include "cache.h"
#include "config.h"
#include "dir.h"
#include "builtin.h"
#include "parse-options.h"

1
builtin/describe.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "lockfile.h"
#include "commit.h"
#include "tag.h"

1
builtin/diff-files.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
#include "config.h"
#include "diff.h"
#include "commit.h"
#include "revision.h"

1
builtin/diff-index.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "diff.h"
#include "commit.h"
#include "revision.h"

1
builtin/diff-tree.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "diff.h"
#include "commit.h"
#include "log-tree.h"

1
builtin/diff.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (c) 2006 Junio C Hamano
*/
#include "cache.h"
#include "config.h"
#include "lockfile.h"
#include "color.h"
#include "commit.h"

1
builtin/difftool.c

@ -12,6 +12,7 @@ @@ -12,6 +12,7 @@
* Copyright (C) 2016 Johannes Schindelin
*/
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "run-command.h"
#include "exec_cmd.h"

1
builtin/fast-export.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
*/
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "refs.h"
#include "commit.h"
#include "object.h"

1
builtin/fetch.c

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
* "git fetch"
*/
#include "cache.h"
#include "config.h"
#include "refs.h"
#include "commit.h"
#include "builtin.h"

1
builtin/fmt-merge-msg.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "refs.h"
#include "commit.h"
#include "diff.h"

1
builtin/for-each-ref.c

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

1
builtin/fsck.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "commit.h"
#include "tree.h"
#include "blob.h"

1
builtin/gc.c

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

#include "builtin.h"
#include "config.h"
#include "tempfile.h"
#include "lockfile.h"
#include "parse-options.h"

1
builtin/grep.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (c) 2006 Junio C Hamano
*/
#include "cache.h"
#include "config.h"
#include "blob.h"
#include "tree.h"
#include "commit.h"

1
builtin/hash-object.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
* Copyright (C) Junio C Hamano, 2005
*/
#include "builtin.h"
#include "config.h"
#include "blob.h"
#include "quote.h"
#include "parse-options.h"

1
builtin/help.c

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
* Builtin help command
*/
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "exec_cmd.h"
#include "parse-options.h"

1
builtin/index-pack.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "builtin.h"
#include "config.h"
#include "delta.h"
#include "pack.h"
#include "csum-file.h"

1
builtin/init-db.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
#include "config.h"
#include "refs.h"
#include "builtin.h"
#include "exec_cmd.h"

1
builtin/log.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
* 2006 Junio Hamano
*/
#include "cache.h"
#include "config.h"
#include "refs.h"
#include "color.h"
#include "commit.h"

1
builtin/ls-files.c

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
#include "config.h"
#include "quote.h"
#include "dir.h"
#include "builtin.h"

1
builtin/ls-tree.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
#include "config.h"
#include "blob.h"
#include "tree.h"
#include "commit.h"

1
builtin/merge-base.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "commit.h"
#include "refs.h"
#include "diff.h"

1
builtin/merge-file.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "xdiff/xdiff.h"
#include "xdiff-interface.h"
#include "parse-options.h"

1
builtin/merge.c

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

#include "cache.h"
#include "config.h"
#include "parse-options.h"
#include "builtin.h"
#include "lockfile.h"

1
builtin/mv.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (C) 2006 Johannes Schindelin
*/
#include "builtin.h"
#include "config.h"
#include "pathspec.h"
#include "lockfile.h"
#include "dir.h"

1
builtin/name-rev.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "commit.h"
#include "tag.h"
#include "refs.h"

1
builtin/notes.c

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

#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "notes.h"
#include "blob.h"

1
builtin/pack-objects.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "attr.h"
#include "object.h"
#include "blob.h"

1
builtin/patch-id.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "builtin.h"
#include "config.h"

static void flush_current_id(int patchlen, struct object_id *id, struct object_id *result)
{

1
builtin/pull.c

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
* Fetch one or more remote refs and merge it/them into the current HEAD.
*/
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "parse-options.h"
#include "exec_cmd.h"

1
builtin/push.c

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
* "git push"
*/
#include "cache.h"
#include "config.h"
#include "refs.h"
#include "run-command.h"
#include "builtin.h"

1
builtin/read-tree.c

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

#include "cache.h"
#include "config.h"
#include "lockfile.h"
#include "object.h"
#include "tree.h"

1
builtin/rebase--helper.c

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


1
builtin/receive-pack.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "builtin.h"
#include "config.h"
#include "lockfile.h"
#include "pack.h"
#include "refs.h"

1
builtin/reflog.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "builtin.h"
#include "config.h"
#include "lockfile.h"
#include "commit.h"
#include "refs.h"

1
builtin/remote.c

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

1
builtin/repack.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "dir.h"
#include "parse-options.h"
#include "run-command.h"

1
builtin/replace.c

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

#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "refs.h"
#include "parse-options.h"

1
builtin/rerere.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "dir.h"
#include "parse-options.h"
#include "string-list.h"

1
builtin/reset.c

@ -8,6 +8,7 @@ @@ -8,6 +8,7 @@
* Copyright (c) 2005, 2006 Linus Torvalds and Junio C Hamano
*/
#include "builtin.h"
#include "config.h"
#include "lockfile.h"
#include "tag.h"
#include "object.h"

1
builtin/rev-list.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "commit.h"
#include "diff.h"
#include "revision.h"

1
builtin/rev-parse.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
#include "config.h"
#include "commit.h"
#include "refs.h"
#include "quote.h"

1
builtin/revert.c

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

1
builtin/rm.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (C) Linus Torvalds 2006
*/
#include "builtin.h"
#include "config.h"
#include "lockfile.h"
#include "dir.h"
#include "cache-tree.h"

1
builtin/send-pack.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "builtin.h"
#include "config.h"
#include "commit.h"
#include "refs.h"
#include "pkt-line.h"

1
builtin/shortlog.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "commit.h"
#include "diff.h"
#include "string-list.h"

1
builtin/show-branch.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "commit.h"
#include "refs.h"
#include "builtin.h"

1
builtin/stripspace.c

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


1
builtin/submodule--helper.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "parse-options.h"
#include "quote.h"
#include "pathspec.h"

1
builtin/symbolic-ref.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "builtin.h"
#include "config.h"
#include "cache.h"
#include "refs.h"
#include "parse-options.h"

1
builtin/tag.c

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

#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "refs.h"
#include "tag.h"

1
builtin/unpack-file.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "builtin.h"
#include "config.h"

static char *create_temp_file(unsigned char *sha1)
{

1
builtin/unpack-objects.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "object.h"
#include "delta.h"
#include "pack.h"

1
builtin/update-index.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (C) Linus Torvalds, 2005
*/
#include "cache.h"
#include "config.h"
#include "lockfile.h"
#include "quote.h"
#include "cache-tree.h"

1
builtin/update-ref.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "refs.h"
#include "builtin.h"
#include "parse-options.h"

1
builtin/update-server-info.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "parse-options.h"


1
builtin/var.c

@ -4,6 +4,7 @@ @@ -4,6 +4,7 @@
* Copyright (C) Eric Biederman, 2005
*/
#include "builtin.h"
#include "config.h"

static const char var_usage[] = "git var (-l | <variable>)";


1
builtin/verify-commit.c

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
* Based on git-verify-tag
*/
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "commit.h"
#include "run-command.h"

1
builtin/verify-pack.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "run-command.h"
#include "parse-options.h"


1
builtin/verify-tag.c

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
* Based on git-verify-tag.sh
*/
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "tag.h"
#include "run-command.h"

1
builtin/worktree.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "builtin.h"
#include "dir.h"
#include "parse-options.h"

1
builtin/write-tree.c

@ -5,6 +5,7 @@ @@ -5,6 +5,7 @@
*/
#include "builtin.h"
#include "cache.h"
#include "config.h"
#include "tree.h"
#include "cache-tree.h"
#include "parse-options.h"

204
cache.h

@ -525,12 +525,15 @@ extern void set_git_work_tree(const char *tree); @@ -525,12 +525,15 @@ extern void set_git_work_tree(const char *tree);

extern void setup_work_tree(void);
/*
* Find GIT_DIR of the repository that contains the current working directory,
* without changing the working directory or other global state. The result is
* appended to gitdir. The return value is either NULL if no repository was
* found, or pointing to the path inside gitdir's buffer.
*/
extern const char *discover_git_directory(struct strbuf *gitdir);
* Find the commondir and gitdir of the repository that contains the current
* working directory, without changing the working directory or other global
* state. The result is appended to commondir and gitdir. If the discovered
* gitdir does not correspond to a worktree, then 'commondir' and 'gitdir' will
* both have the same result appended to the buffer. The return value is
* either 0 upon success and non-zero if no repository was found.
*/
extern int discover_git_directory(struct strbuf *commondir,
struct strbuf *gitdir);
extern const char *setup_git_directory_gently(int *);
extern const char *setup_git_directory(void);
extern char *prefix_path(const char *prefix, int len, const char *path);
@ -1879,188 +1882,9 @@ extern int packed_object_info(struct packed_git *pack, off_t offset, struct obje @@ -1879,188 +1882,9 @@ extern int packed_object_info(struct packed_git *pack, off_t offset, struct obje
/* Dumb servers support */
extern int update_server_info(int);

/* git_config_parse_key() returns these negated: */
#define CONFIG_INVALID_KEY 1
#define CONFIG_NO_SECTION_OR_NAME 2
/* git_config_set_gently(), git_config_set_multivar_gently() return the above or these: */
#define CONFIG_NO_LOCK -1
#define CONFIG_INVALID_FILE 3
#define CONFIG_NO_WRITE 4
#define CONFIG_NOTHING_SET 5
#define CONFIG_INVALID_PATTERN 6
#define CONFIG_GENERIC_ERROR 7

#define CONFIG_REGEX_NONE ((void *)1)

struct git_config_source {
unsigned int use_stdin:1;
const char *file;
const char *blob;
};

enum config_origin_type {
CONFIG_ORIGIN_BLOB,
CONFIG_ORIGIN_FILE,
CONFIG_ORIGIN_STDIN,
CONFIG_ORIGIN_SUBMODULE_BLOB,
CONFIG_ORIGIN_CMDLINE
};

struct config_options {
unsigned int respect_includes : 1;
const char *git_dir;
};

typedef int (*config_fn_t)(const char *, const char *, void *);
extern int git_default_config(const char *, const char *, void *);
extern int git_config_from_file(config_fn_t fn, const char *, void *);
extern int git_config_from_mem(config_fn_t fn, const enum config_origin_type,
const char *name, const char *buf, size_t len, void *data);
extern int git_config_from_blob_sha1(config_fn_t fn, const char *name,
const unsigned char *sha1, void *data);
extern void git_config_push_parameter(const char *text);
extern int git_config_from_parameters(config_fn_t fn, void *data);
extern void read_early_config(config_fn_t cb, void *data);
extern void git_config(config_fn_t fn, void *);
extern int git_config_with_options(config_fn_t fn, void *,
struct git_config_source *config_source,
const struct config_options *opts);
extern int git_parse_ulong(const char *, unsigned long *);
extern int git_parse_maybe_bool(const char *);
extern int git_config_int(const char *, const char *);
extern int64_t git_config_int64(const char *, const char *);
extern unsigned long git_config_ulong(const char *, const char *);
extern ssize_t git_config_ssize_t(const char *, const char *);
extern int git_config_bool_or_int(const char *, const char *, int *);
extern int git_config_bool(const char *, const char *);
extern int git_config_maybe_bool(const char *, const char *);
extern int git_config_string(const char **, const char *, const char *);
extern int git_config_pathname(const char **, const char *, const char *);
extern int git_config_set_in_file_gently(const char *, const char *, const char *);
extern void git_config_set_in_file(const char *, const char *, const char *);
extern int git_config_set_gently(const char *, const char *);
extern void git_config_set(const char *, const char *);
extern int git_config_parse_key(const char *, char **, int *);
extern int git_config_key_is_valid(const char *key);
extern int git_config_set_multivar_gently(const char *, const char *, const char *, int);
extern void git_config_set_multivar(const char *, const char *, const char *, int);
extern int git_config_set_multivar_in_file_gently(const char *, const char *, const char *, const char *, int);
extern void git_config_set_multivar_in_file(const char *, const char *, const char *, const char *, int);
extern int git_config_rename_section(const char *, const char *);
extern int git_config_rename_section_in_file(const char *, const char *, const char *);
extern const char *git_etc_gitconfig(void);
extern int git_env_bool(const char *, int);
extern unsigned long git_env_ulong(const char *, unsigned long);
extern int git_config_system(void);
extern int config_error_nonbool(const char *);
#if defined(__GNUC__)
#define config_error_nonbool(s) (config_error_nonbool(s), const_error())
#endif
extern const char *get_log_output_encoding(void);
extern const char *get_commit_output_encoding(void);

extern int git_config_parse_parameter(const char *, config_fn_t fn, void *data);

enum config_scope {
CONFIG_SCOPE_UNKNOWN = 0,
CONFIG_SCOPE_SYSTEM,
CONFIG_SCOPE_GLOBAL,
CONFIG_SCOPE_REPO,
CONFIG_SCOPE_CMDLINE,
};

extern enum config_scope current_config_scope(void);
extern const char *current_config_origin_type(void);
extern const char *current_config_name(void);

struct config_include_data {
int depth;
config_fn_t fn;
void *data;
const struct config_options *opts;
};
#define CONFIG_INCLUDE_INIT { 0 }
extern int git_config_include(const char *name, const char *value, void *data);

/*
* Match and parse a config key of the form:
*
* section.(subsection.)?key
*
* (i.e., what gets handed to a config_fn_t). The caller provides the section;
* we return -1 if it does not match, 0 otherwise. The subsection and key
* out-parameters are filled by the function (and *subsection is NULL if it is
* missing).
*
* If the subsection pointer-to-pointer passed in is NULL, returns 0 only if
* there is no subsection at all.
*/
extern int parse_config_key(const char *var,
const char *section,
const char **subsection, int *subsection_len,
const char **key);

struct config_set_element {
struct hashmap_entry ent;
char *key;
struct string_list value_list;
};

struct configset_list_item {
struct config_set_element *e;
int value_index;
};

/*
* the contents of the list are ordered according to their
* position in the config files and order of parsing the files.
* (i.e. key-value pair at the last position of .git/config will
* be at the last item of the list)
*/
struct configset_list {
struct configset_list_item *items;
unsigned int nr, alloc;
};

struct config_set {
struct hashmap config_hash;
int hash_initialized;
struct configset_list list;
};

extern void git_configset_init(struct config_set *cs);
extern int git_configset_add_file(struct config_set *cs, const char *filename);
extern int git_configset_get_value(struct config_set *cs, const char *key, const char **value);
extern const struct string_list *git_configset_get_value_multi(struct config_set *cs, const char *key);
extern void git_configset_clear(struct config_set *cs);
extern int git_configset_get_string_const(struct config_set *cs, const char *key, const char **dest);
extern int git_configset_get_string(struct config_set *cs, const char *key, char **dest);
extern int git_configset_get_int(struct config_set *cs, const char *key, int *dest);
extern int git_configset_get_ulong(struct config_set *cs, const char *key, unsigned long *dest);
extern int git_configset_get_bool(struct config_set *cs, const char *key, int *dest);
extern int git_configset_get_bool_or_int(struct config_set *cs, const char *key, int *is_bool, int *dest);
extern int git_configset_get_maybe_bool(struct config_set *cs, const char *key, int *dest);
extern int git_configset_get_pathname(struct config_set *cs, const char *key, const char **dest);

extern int git_config_get_value(const char *key, const char **value);
extern const struct string_list *git_config_get_value_multi(const char *key);
extern void git_config_clear(void);
extern void git_config_iter(config_fn_t fn, void *data);
extern int git_config_get_string_const(const char *key, const char **dest);
extern int git_config_get_string(const char *key, char **dest);
extern int git_config_get_int(const char *key, int *dest);
extern int git_config_get_ulong(const char *key, unsigned long *dest);
extern int git_config_get_bool(const char *key, int *dest);
extern int git_config_get_bool_or_int(const char *key, int *is_bool, int *dest);
extern int git_config_get_maybe_bool(const char *key, int *dest);
extern int git_config_get_pathname(const char *key, const char **dest);
extern int git_config_get_untracked_cache(void);
extern int git_config_get_split_index(void);
extern int git_config_get_max_percent_split_change(void);

/* This dies if the configured or default date is in the future */
extern int git_config_get_expiry(const char *key, const char **output);

/*
* This is a hack for test programs like test-dump-untracked-cache to
* ensure that they do not modify the untracked cache when reading it.
@ -2068,16 +1892,6 @@ extern int git_config_get_expiry(const char *key, const char **output); @@ -2068,16 +1892,6 @@ extern int git_config_get_expiry(const char *key, const char **output);
*/
extern int ignore_untracked_cache_config;

struct key_value_info {
const char *filename;
int linenr;
enum config_origin_type origin_type;
enum config_scope scope;
};

extern NORETURN void git_die_config(const char *key, const char *err, ...) __attribute__((format(printf, 2, 3)));
extern NORETURN void git_die_config_linenr(const char *key, const char *filename, int linenr);

extern int committer_ident_sufficiently_given(void);
extern int author_ident_sufficiently_given(void);


1
color.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "color.h"

static int git_use_color_default = GIT_COLOR_AUTO;

1
column.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "column.h"
#include "string-list.h"
#include "parse-options.h"

1
compat/precompose_utf8.c

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
#define PRECOMPOSE_UNICODE_C

#include "cache.h"
#include "config.h"
#include "utf8.h"
#include "precompose_utf8.h"


41
config.c

@ -6,6 +6,7 @@ @@ -6,6 +6,7 @@
*
*/
#include "cache.h"
#include "config.h"
#include "lockfile.h"
#include "exec_cmd.h"
#include "strbuf.h"
@ -218,8 +219,6 @@ static int include_by_gitdir(const struct config_options *opts, @@ -218,8 +219,6 @@ static int include_by_gitdir(const struct config_options *opts,

if (opts->git_dir)
git_dir = opts->git_dir;
else if (have_git_dir())
git_dir = get_git_dir();
else
goto done;

@ -1546,10 +1545,8 @@ static int do_git_config_sequence(const struct config_options *opts, @@ -1546,10 +1545,8 @@ static int do_git_config_sequence(const struct config_options *opts,
char *user_config = expand_user_path("~/.gitconfig", 0);
char *repo_config;

if (opts->git_dir)
repo_config = mkpathdup("%s/config", opts->git_dir);
else if (have_git_dir())
repo_config = git_pathdup("config");
if (opts->commondir)
repo_config = mkpathdup("%s/config", opts->commondir);
else
repo_config = NULL;

@ -1580,9 +1577,9 @@ static int do_git_config_sequence(const struct config_options *opts, @@ -1580,9 +1577,9 @@ static int do_git_config_sequence(const struct config_options *opts,
return ret;
}

int git_config_with_options(config_fn_t fn, void *data,
struct git_config_source *config_source,
const struct config_options *opts)
int config_with_options(config_fn_t fn, void *data,
struct git_config_source *config_source,
const struct config_options *opts)
{
struct config_include_data inc = CONFIG_INCLUDE_INIT;

@ -1613,9 +1610,14 @@ static void git_config_raw(config_fn_t fn, void *data) @@ -1613,9 +1610,14 @@ static void git_config_raw(config_fn_t fn, void *data)
struct config_options opts = {0};

opts.respect_includes = 1;
if (git_config_with_options(fn, data, NULL, &opts) < 0)
if (have_git_dir()) {
opts.commondir = get_git_common_dir();
opts.git_dir = get_git_dir();
}

if (config_with_options(fn, data, NULL, &opts) < 0)
/*
* git_config_with_options() normally returns only
* config_with_options() normally returns only
* zero, as most errors are fatal, and
* non-fatal potential errors are guarded by "if"
* statements that are entered only when no error is
@ -1654,11 +1656,13 @@ static void configset_iter(struct config_set *cs, config_fn_t fn, void *data) @@ -1654,11 +1656,13 @@ static void configset_iter(struct config_set *cs, config_fn_t fn, void *data)
void read_early_config(config_fn_t cb, void *data)
{
struct config_options opts = {0};
struct strbuf buf = STRBUF_INIT;
struct strbuf commondir = STRBUF_INIT;
struct strbuf gitdir = STRBUF_INIT;

opts.respect_includes = 1;

if (have_git_dir())
if (have_git_dir()) {
opts.commondir = get_git_common_dir();
opts.git_dir = get_git_dir();
/*
* When setup_git_directory() was not yet asked to discover the
@ -1668,12 +1672,15 @@ void read_early_config(config_fn_t cb, void *data) @@ -1668,12 +1672,15 @@ void read_early_config(config_fn_t cb, void *data)
* notably, the current working directory is still the same after the
* call).
*/
else if (discover_git_directory(&buf))
opts.git_dir = buf.buf;
} else if (!discover_git_directory(&commondir, &gitdir)) {
opts.commondir = commondir.buf;
opts.git_dir = gitdir.buf;
}

git_config_with_options(cb, data, NULL, &opts);
config_with_options(cb, data, NULL, &opts);

strbuf_release(&buf);
strbuf_release(&commondir);
strbuf_release(&gitdir);
}

static void git_config_check_init(void);

194
config.h

@ -0,0 +1,194 @@ @@ -0,0 +1,194 @@
#ifndef CONFIG_H
#define CONFIG_H

/* git_config_parse_key() returns these negated: */
#define CONFIG_INVALID_KEY 1
#define CONFIG_NO_SECTION_OR_NAME 2
/* git_config_set_gently(), git_config_set_multivar_gently() return the above or these: */
#define CONFIG_NO_LOCK -1
#define CONFIG_INVALID_FILE 3
#define CONFIG_NO_WRITE 4
#define CONFIG_NOTHING_SET 5
#define CONFIG_INVALID_PATTERN 6
#define CONFIG_GENERIC_ERROR 7

#define CONFIG_REGEX_NONE ((void *)1)

struct git_config_source {
unsigned int use_stdin:1;
const char *file;
const char *blob;
};

enum config_origin_type {
CONFIG_ORIGIN_BLOB,
CONFIG_ORIGIN_FILE,
CONFIG_ORIGIN_STDIN,
CONFIG_ORIGIN_SUBMODULE_BLOB,
CONFIG_ORIGIN_CMDLINE
};

struct config_options {
unsigned int respect_includes : 1;
const char *commondir;
const char *git_dir;
};

typedef int (*config_fn_t)(const char *, const char *, void *);
extern int git_default_config(const char *, const char *, void *);
extern int git_config_from_file(config_fn_t fn, const char *, void *);
extern int git_config_from_mem(config_fn_t fn, const enum config_origin_type,
const char *name, const char *buf, size_t len, void *data);
extern int git_config_from_blob_sha1(config_fn_t fn, const char *name,
const unsigned char *sha1, void *data);
extern void git_config_push_parameter(const char *text);
extern int git_config_from_parameters(config_fn_t fn, void *data);
extern void read_early_config(config_fn_t cb, void *data);
extern void git_config(config_fn_t fn, void *);
extern int config_with_options(config_fn_t fn, void *,
struct git_config_source *config_source,
const struct config_options *opts);
extern int git_parse_ulong(const char *, unsigned long *);
extern int git_parse_maybe_bool(const char *);
extern int git_config_int(const char *, const char *);
extern int64_t git_config_int64(const char *, const char *);
extern unsigned long git_config_ulong(const char *, const char *);
extern ssize_t git_config_ssize_t(const char *, const char *);
extern int git_config_bool_or_int(const char *, const char *, int *);
extern int git_config_bool(const char *, const char *);
extern int git_config_maybe_bool(const char *, const char *);
extern int git_config_string(const char **, const char *, const char *);
extern int git_config_pathname(const char **, const char *, const char *);
extern int git_config_set_in_file_gently(const char *, const char *, const char *);
extern void git_config_set_in_file(const char *, const char *, const char *);
extern int git_config_set_gently(const char *, const char *);
extern void git_config_set(const char *, const char *);
extern int git_config_parse_key(const char *, char **, int *);
extern int git_config_key_is_valid(const char *key);
extern int git_config_set_multivar_gently(const char *, const char *, const char *, int);
extern void git_config_set_multivar(const char *, const char *, const char *, int);
extern int git_config_set_multivar_in_file_gently(const char *, const char *, const char *, const char *, int);
extern void git_config_set_multivar_in_file(const char *, const char *, const char *, const char *, int);
extern int git_config_rename_section(const char *, const char *);
extern int git_config_rename_section_in_file(const char *, const char *, const char *);
extern const char *git_etc_gitconfig(void);
extern int git_env_bool(const char *, int);
extern unsigned long git_env_ulong(const char *, unsigned long);
extern int git_config_system(void);
extern int config_error_nonbool(const char *);
#if defined(__GNUC__)
#define config_error_nonbool(s) (config_error_nonbool(s), const_error())
#endif

extern int git_config_parse_parameter(const char *, config_fn_t fn, void *data);

enum config_scope {
CONFIG_SCOPE_UNKNOWN = 0,
CONFIG_SCOPE_SYSTEM,
CONFIG_SCOPE_GLOBAL,
CONFIG_SCOPE_REPO,
CONFIG_SCOPE_CMDLINE,
};

extern enum config_scope current_config_scope(void);
extern const char *current_config_origin_type(void);
extern const char *current_config_name(void);

struct config_include_data {
int depth;
config_fn_t fn;
void *data;
const struct config_options *opts;
};
#define CONFIG_INCLUDE_INIT { 0 }
extern int git_config_include(const char *name, const char *value, void *data);

/*
* Match and parse a config key of the form:
*
* section.(subsection.)?key
*
* (i.e., what gets handed to a config_fn_t). The caller provides the section;
* we return -1 if it does not match, 0 otherwise. The subsection and key
* out-parameters are filled by the function (and *subsection is NULL if it is
* missing).
*
* If the subsection pointer-to-pointer passed in is NULL, returns 0 only if
* there is no subsection at all.
*/
extern int parse_config_key(const char *var,
const char *section,
const char **subsection, int *subsection_len,
const char **key);

struct config_set_element {
struct hashmap_entry ent;
char *key;
struct string_list value_list;
};

struct configset_list_item {
struct config_set_element *e;
int value_index;
};

/*
* the contents of the list are ordered according to their
* position in the config files and order of parsing the files.
* (i.e. key-value pair at the last position of .git/config will
* be at the last item of the list)
*/
struct configset_list {
struct configset_list_item *items;
unsigned int nr, alloc;
};

struct config_set {
struct hashmap config_hash;
int hash_initialized;
struct configset_list list;
};

extern void git_configset_init(struct config_set *cs);
extern int git_configset_add_file(struct config_set *cs, const char *filename);
extern int git_configset_get_value(struct config_set *cs, const char *key, const char **value);
extern const struct string_list *git_configset_get_value_multi(struct config_set *cs, const char *key);
extern void git_configset_clear(struct config_set *cs);
extern int git_configset_get_string_const(struct config_set *cs, const char *key, const char **dest);
extern int git_configset_get_string(struct config_set *cs, const char *key, char **dest);
extern int git_configset_get_int(struct config_set *cs, const char *key, int *dest);
extern int git_configset_get_ulong(struct config_set *cs, const char *key, unsigned long *dest);
extern int git_configset_get_bool(struct config_set *cs, const char *key, int *dest);
extern int git_configset_get_bool_or_int(struct config_set *cs, const char *key, int *is_bool, int *dest);
extern int git_configset_get_maybe_bool(struct config_set *cs, const char *key, int *dest);
extern int git_configset_get_pathname(struct config_set *cs, const char *key, const char **dest);

extern int git_config_get_value(const char *key, const char **value);
extern const struct string_list *git_config_get_value_multi(const char *key);
extern void git_config_clear(void);
extern int git_config_get_string_const(const char *key, const char **dest);
extern int git_config_get_string(const char *key, char **dest);
extern int git_config_get_int(const char *key, int *dest);
extern int git_config_get_ulong(const char *key, unsigned long *dest);
extern int git_config_get_bool(const char *key, int *dest);
extern int git_config_get_bool_or_int(const char *key, int *is_bool, int *dest);
extern int git_config_get_maybe_bool(const char *key, int *dest);
extern int git_config_get_pathname(const char *key, const char **dest);
extern int git_config_get_untracked_cache(void);
extern int git_config_get_split_index(void);
extern int git_config_get_max_percent_split_change(void);

/* This dies if the configured or default date is in the future */
extern int git_config_get_expiry(const char *key, const char **output);

struct key_value_info {
const char *filename;
int linenr;
enum config_origin_type origin_type;
enum config_scope scope;
};

extern NORETURN void git_die_config(const char *key, const char *err, ...) __attribute__((format(printf, 2, 3)));
extern NORETURN void git_die_config_linenr(const char *key, const char *filename, int linenr);

#endif /* CONFIG_H */

1
connect.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#include "git-compat-util.h"
#include "cache.h"
#include "config.h"
#include "pkt-line.h"
#include "quote.h"
#include "refs.h"

1
convert.c

@ -1,5 +1,6 @@ @@ -1,5 +1,6 @@
#define NO_THE_INDEX_COMPATIBILITY_MACROS
#include "cache.h"
#include "config.h"
#include "attr.h"
#include "run-command.h"
#include "quote.h"

1
credential-cache--daemon.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "tempfile.h"
#include "credential.h"
#include "unix-socket.h"

1
credential.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "credential.h"
#include "string-list.h"
#include "run-command.h"

1
daemon.c

@ -1,4 +1,5 @@ @@ -1,4 +1,5 @@
#include "cache.h"
#include "config.h"
#include "pkt-line.h"
#include "run-command.h"
#include "strbuf.h"

1
diff.c

@ -2,6 +2,7 @@ @@ -2,6 +2,7 @@
* Copyright (C) 2005 Junio C Hamano
*/
#include "cache.h"
#include "config.h"
#include "tempfile.h"
#include "quote.h"
#include "diff.h"

1
dir.c

@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
*/
#define NO_THE_INDEX_COMPATIBILITY_MACROS
#include "cache.h"
#include "config.h"
#include "dir.h"
#include "attr.h"
#include "refs.h"

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

Loading…
Cancel
Save