environment.h: move declarations for environment.c functions from cache.h
Signed-off-by: Elijah Newren <newren@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Elijah Newren committed
Mar 21, 2023 at 06:26 UTC
32a8f510614312cc8b81bbc6a982d08ab7562ab4
119 files changed
+330
-207
apply.c
+1
@@ -16,6 +16,7 @@
16
#include "delta.h"
17
#include "diff.h"
18
#include "dir.h"
19
+#include "environment.h"
20
#include "gettext.h"
21
#include "hex.h"
22
#include "xdiff-interface.h"
archive.c
+1
@@ -2,6 +2,7 @@
2
#include "abspath.h"
3
#include "alloc.h"
4
#include "config.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "refs.h"
attr.c
+1
@@ -9,6 +9,7 @@
9
#include "cache.h"
10
#include "alloc.h"
11
#include "config.h"
12
+#include "environment.h"
13
#include "exec-cmd.h"
14
#include "attr.h"
15
#include "dir.h"
bisect.c
+1
@@ -2,6 +2,7 @@
2
#include "config.h"
3
#include "commit.h"
4
#include "diff.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "revision.h"
branch.c
+1
@@ -2,6 +2,7 @@
2
#include "cache.h"
3
#include "config.h"
4
#include "branch.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "refs.h"
builtin/am.c
+1
@@ -8,6 +8,7 @@
8
#include "abspath.h"
9
#include "config.h"
10
#include "builtin.h"
11
+#include "environment.h"
12
#include "exec-cmd.h"
13
#include "gettext.h"
14
#include "hex.h"
builtin/bisect.c
+1
@@ -1,5 +1,6 @@
1
#include "builtin.h"
2
#include "cache.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "hex.h"
6
#include "parse-options.h"
builtin/blame.c
+1
@@ -10,6 +10,7 @@
10
#include "config.h"
11
#include "color.h"
12
#include "builtin.h"
13
+#include "environment.h"
14
#include "gettext.h"
15
#include "hex.h"
16
#include "repository.h"
builtin/cat-file.c
+1
@@ -9,6 +9,7 @@
9
#include "config.h"
10
#include "builtin.h"
11
#include "diff.h"
12
+#include "environment.h"
13
#include "gettext.h"
14
#include "hex.h"
15
#include "ident.h"
builtin/check-attr.c
+1
@@ -3,6 +3,7 @@
3
#include "cache.h"
4
#include "config.h"
5
#include "attr.h"
6
+#include "environment.h"
7
#include "gettext.h"
8
#include "quote.h"
9
#include "parse-options.h"
builtin/checkout.c
+1
@@ -9,6 +9,7 @@
9
#include "config.h"
10
#include "diff.h"
11
#include "dir.h"
12
+#include "environment.h"
13
#include "gettext.h"
14
#include "hex.h"
15
#include "hook.h"
builtin/clone.c
+1
@@ -12,6 +12,7 @@
12
#include "builtin.h"
13
#include "abspath.h"
14
#include "config.h"
15
+#include "environment.h"
16
#include "gettext.h"
17
#include "hex.h"
18
#include "lockfile.h"
builtin/commit-graph.c
+1
@@ -1,6 +1,7 @@
1
#include "builtin.h"
2
#include "config.h"
3
#include "dir.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
7
#include "lockfile.h"
builtin/config.c
+1
@@ -3,6 +3,7 @@
3
#include "alloc.h"
4
#include "config.h"
5
#include "color.h"
6
+#include "environment.h"
7
#include "gettext.h"
8
#include "ident.h"
9
#include "parse-options.h"
builtin/count-objects.c
+1
@@ -7,6 +7,7 @@
7
#include "cache.h"
8
#include "config.h"
9
#include "dir.h"
10
+#include "environment.h"
11
#include "gettext.h"
12
#include "repository.h"
13
#include "builtin.h"
builtin/describe.c
+1
@@ -1,6 +1,7 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "cache.h"
3
#include "config.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
7
#include "lockfile.h"
builtin/difftool.c
+1
@@ -17,6 +17,7 @@
17
#include "config.h"
18
#include "builtin.h"
19
#include "run-command.h"
20
+#include "environment.h"
21
#include "exec-cmd.h"
22
#include "gettext.h"
23
#include "hex.h"
builtin/fast-import.c
+1
@@ -1,6 +1,7 @@
1
#include "builtin.h"
2
#include "abspath.h"
3
#include "cache.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
7
#include "repository.h"
builtin/fetch.c
+1
@@ -4,6 +4,7 @@
4
#include "cache.h"
5
#include "config.h"
6
#include "gettext.h"
7
+#include "environment.h"
8
#include "hex.h"
9
#include "repository.h"
10
#include "refs.h"
builtin/fsmonitor--daemon.c
+1
@@ -2,6 +2,7 @@
2
#include "abspath.h"
3
#include "alloc.h"
4
#include "config.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "parse-options.h"
8
#include "fsmonitor.h"
builtin/gc.c
+1
@@ -12,6 +12,7 @@
12
13
#include "builtin.h"
14
#include "abspath.h"
15
+#include "environment.h"
16
#include "hex.h"
17
#include "repository.h"
18
#include "config.h"
builtin/index-pack.c
+1
@@ -2,6 +2,7 @@
2
#include "alloc.h"
3
#include "config.h"
4
#include "delta.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "pack.h"
builtin/init-db.c
+1
@@ -6,6 +6,7 @@
6
#include "cache.h"
7
#include "abspath.h"
8
#include "config.h"
9
+#include "environment.h"
10
#include "gettext.h"
11
#include "refs.h"
12
#include "builtin.h"
builtin/log.c
+1
@@ -8,6 +8,7 @@
8
#include "abspath.h"
9
#include "alloc.h"
10
#include "config.h"
11
+#include "environment.h"
12
#include "gettext.h"
13
#include "hex.h"
14
#include "refs.h"
builtin/mailinfo.c
+1
@@ -5,6 +5,7 @@
5
#include "cache.h"
6
#include "abspath.h"
7
#include "builtin.h"
8
+#include "environment.h"
9
#include "gettext.h"
10
#include "utf8.h"
11
#include "strbuf.h"
builtin/multi-pack-index.c
+1
@@ -2,6 +2,7 @@
2
#include "abspath.h"
3
#include "cache.h"
4
#include "config.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "parse-options.h"
8
#include "midx.h"
builtin/mv.c
+1
@@ -8,6 +8,7 @@
8
#include "abspath.h"
9
#include "alloc.h"
10
#include "config.h"
11
+#include "environment.h"
12
#include "gettext.h"
13
#include "pathspec.h"
14
#include "lockfile.h"
builtin/name-rev.c
+1
@@ -1,5 +1,6 @@
1
#include "builtin.h"
2
#include "alloc.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "hex.h"
6
#include "repository.h"
builtin/pack-objects.c
+1
@@ -1,5 +1,6 @@
1
#include "builtin.h"
2
#include "alloc.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "hex.h"
6
#include "repository.h"
builtin/prune.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "commit.h"
3
#include "diff.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
7
#include "revision.h"
builtin/push.c
+1
@@ -4,6 +4,7 @@
4
#include "cache.h"
5
#include "branch.h"
6
#include "config.h"
7
+#include "environment.h"
8
#include "gettext.h"
9
#include "refs.h"
10
#include "refspec.h"
builtin/rebase.c
+1
@@ -7,6 +7,7 @@
7
#define USE_THE_INDEX_VARIABLE
8
#include "builtin.h"
9
#include "abspath.h"
10
+#include "environment.h"
11
#include "gettext.h"
12
#include "hex.h"
13
#include "run-command.h"
builtin/receive-pack.c
+1
@@ -2,6 +2,7 @@
2
#include "abspath.h"
3
#include "repository.h"
4
#include "config.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "lockfile.h"
builtin/repack.c
+1
@@ -2,6 +2,7 @@
2
#include "alloc.h"
3
#include "config.h"
4
#include "dir.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "parse-options.h"
builtin/replace.c
+1
@@ -11,6 +11,7 @@
11
#include "cache.h"
12
#include "config.h"
13
#include "builtin.h"
14
+#include "environment.h"
15
#include "gettext.h"
16
#include "hex.h"
17
#include "refs.h"
builtin/reset.c
+1
@@ -10,6 +10,7 @@
10
#define USE_THE_INDEX_VARIABLE
11
#include "builtin.h"
12
#include "config.h"
13
+#include "environment.h"
14
#include "gettext.h"
15
#include "hex.h"
16
#include "lockfile.h"
builtin/rev-list.c
+1
@@ -2,6 +2,7 @@
2
#include "config.h"
3
#include "commit.h"
4
#include "diff.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "revision.h"
builtin/rev-parse.c
+1
@@ -9,6 +9,7 @@
9
#include "alloc.h"
10
#include "config.h"
11
#include "commit.h"
12
+#include "environment.h"
13
#include "gettext.h"
14
#include "hex.h"
15
#include "refs.h"
builtin/shortlog.c
+1
@@ -3,6 +3,7 @@
3
#include "config.h"
4
#include "commit.h"
5
#include "diff.h"
6
+#include "environment.h"
7
#include "gettext.h"
8
#include "string-list.h"
9
#include "revision.h"
builtin/show-branch.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "config.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "hex.h"
6
#include "pretty.h"
builtin/sparse-checkout.c
+1
@@ -2,6 +2,7 @@
2
#include "cache.h"
3
#include "config.h"
4
#include "dir.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "parse-options.h"
8
#include "pathspec.h"
builtin/stash.c
+1
@@ -2,6 +2,7 @@
2
#include "builtin.h"
3
#include "abspath.h"
4
#include "config.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "parse-options.h"
builtin/submodule--helper.c
+1
@@ -2,6 +2,7 @@
2
#include "builtin.h"
3
#include "abspath.h"
4
#include "alloc.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "repository.h"
builtin/unpack-objects.c
+1
@@ -2,6 +2,7 @@
2
#include "cache.h"
3
#include "bulk-checkin.h"
4
#include "config.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "object-store.h"
builtin/update-index.c
+1
@@ -7,6 +7,7 @@
7
#include "cache.h"
8
#include "bulk-checkin.h"
9
#include "config.h"
10
+#include "environment.h"
11
#include "gettext.h"
12
#include "hex.h"
13
#include "lockfile.h"
builtin/worktree.c
+1
@@ -4,6 +4,7 @@
4
#include "config.h"
5
#include "builtin.h"
6
#include "dir.h"
7
+#include "environment.h"
8
#include "gettext.h"
9
#include "hex.h"
10
#include "parse-options.h"
builtin/write-tree.c
+1
@@ -7,6 +7,7 @@
7
#include "builtin.h"
8
#include "cache.h"
9
#include "config.h"
10
+#include "environment.h"
11
#include "gettext.h"
12
#include "hex.h"
13
#include "tree.h"
bulk-checkin.c
+1
@@ -4,6 +4,7 @@
4
#include "git-compat-util.h"
5
#include "alloc.h"
6
#include "bulk-checkin.h"
7
+#include "environment.h"
8
#include "gettext.h"
9
#include "hex.h"
10
#include "lockfile.h"
bundle-uri.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "bundle-uri.h"
3
#include "bundle.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "object-store.h"
7
#include "refs.h"
bundle.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "lockfile.h"
3
#include "bundle.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
7
#include "object-store.h"
cache-tree.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "alloc.h"
3
+#include "environment.h"
4
#include "hex.h"
5
#include "lockfile.h"
6
#include "tree.h"
cache.h
-207
@@ -452,98 +452,10 @@ static inline enum object_type object_type(unsigned int mode)
452
OBJ_BLOB;
453
}
454
455
-/* Double-check local_repo_env below if you add to this list. */
456
-#define GIT_DIR_ENVIRONMENT "GIT_DIR"
457
-#define GIT_COMMON_DIR_ENVIRONMENT "GIT_COMMON_DIR"
458
-#define GIT_NAMESPACE_ENVIRONMENT "GIT_NAMESPACE"
459
-#define GIT_WORK_TREE_ENVIRONMENT "GIT_WORK_TREE"
460
-#define GIT_PREFIX_ENVIRONMENT "GIT_PREFIX"
461
-#define DEFAULT_GIT_DIR_ENVIRONMENT ".git"
462
-#define DB_ENVIRONMENT "GIT_OBJECT_DIRECTORY"
463
-#define INDEX_ENVIRONMENT "GIT_INDEX_FILE"
464
-#define GRAFT_ENVIRONMENT "GIT_GRAFT_FILE"
465
-#define GIT_SHALLOW_FILE_ENVIRONMENT "GIT_SHALLOW_FILE"
466
-#define TEMPLATE_DIR_ENVIRONMENT "GIT_TEMPLATE_DIR"
467
-#define CONFIG_ENVIRONMENT "GIT_CONFIG"
468
-#define CONFIG_DATA_ENVIRONMENT "GIT_CONFIG_PARAMETERS"
469
-#define CONFIG_COUNT_ENVIRONMENT "GIT_CONFIG_COUNT"
470
-#define EXEC_PATH_ENVIRONMENT "GIT_EXEC_PATH"
471
-#define CEILING_DIRECTORIES_ENVIRONMENT "GIT_CEILING_DIRECTORIES"
472
-#define NO_REPLACE_OBJECTS_ENVIRONMENT "GIT_NO_REPLACE_OBJECTS"
473
-#define GIT_REPLACE_REF_BASE_ENVIRONMENT "GIT_REPLACE_REF_BASE"
474
-#define GITATTRIBUTES_FILE ".gitattributes"
475
-#define INFOATTRIBUTES_FILE "info/attributes"
476
-#define ATTRIBUTE_MACRO_PREFIX "[attr]"
477
-#define GITMODULES_FILE ".gitmodules"
478
-#define GITMODULES_INDEX ":.gitmodules"
479
-#define GITMODULES_HEAD "HEAD:.gitmodules"
480
-#define GIT_NOTES_REF_ENVIRONMENT "GIT_NOTES_REF"
481
-#define GIT_NOTES_DEFAULT_REF "refs/notes/commits"
482
-#define GIT_NOTES_DISPLAY_REF_ENVIRONMENT "GIT_NOTES_DISPLAY_REF"
483
-#define GIT_NOTES_REWRITE_REF_ENVIRONMENT "GIT_NOTES_REWRITE_REF"
484
-#define GIT_NOTES_REWRITE_MODE_ENVIRONMENT "GIT_NOTES_REWRITE_MODE"
485
-#define GIT_LITERAL_PATHSPECS_ENVIRONMENT "GIT_LITERAL_PATHSPECS"
486
-#define GIT_GLOB_PATHSPECS_ENVIRONMENT "GIT_GLOB_PATHSPECS"
487
-#define GIT_NOGLOB_PATHSPECS_ENVIRONMENT "GIT_NOGLOB_PATHSPECS"
488
-#define GIT_ICASE_PATHSPECS_ENVIRONMENT "GIT_ICASE_PATHSPECS"
489
-#define GIT_QUARANTINE_ENVIRONMENT "GIT_QUARANTINE_PATH"
490
-#define GIT_OPTIONAL_LOCKS_ENVIRONMENT "GIT_OPTIONAL_LOCKS"
491
-#define GIT_TEXT_DOMAIN_DIR_ENVIRONMENT "GIT_TEXTDOMAINDIR"
492
-
493
-/*
494
- * Environment variable used in handshaking the wire protocol.
495
- * Contains a colon ':' separated list of keys with optional values
496
- * 'key[=value]'. Presence of unknown keys and values must be
497
- * ignored.
498
- */
499
-#define GIT_PROTOCOL_ENVIRONMENT "GIT_PROTOCOL"
500
-/* HTTP header used to handshake the wire protocol */
501
-#define GIT_PROTOCOL_HEADER "Git-Protocol"
502
-
503
-/*
504
- * This environment variable is expected to contain a boolean indicating
505
- * whether we should or should not treat:
506
- *
507
- * GIT_DIR=foo.git git ...
508
- *
509
- * as if GIT_WORK_TREE=. was given. It's not expected that users will make use
510
- * of this, but we use it internally to communicate to sub-processes that we
511
- * are in a bare repo. If not set, defaults to true.
512
- */
513
-#define GIT_IMPLICIT_WORK_TREE_ENVIRONMENT "GIT_IMPLICIT_WORK_TREE"
514
-
515
-/*
516
- * Repository-local GIT_* environment variables; these will be cleared
517
- * when git spawns a sub-process that runs inside another repository.
518
- * The array is NULL-terminated, which makes it easy to pass in the "env"
519
- * parameter of a run-command invocation, or to do a simple walk.
520
- */
521
-extern const char * const local_repo_env[];
522
-
523
-void setup_git_env(const char *git_dir);
524
-
525
-/*
526
- * Returns true iff we have a configured git repository (either via
527
- * setup_git_directory, or in the environment via $GIT_DIR).
528
- */
529
-int have_git_dir(void);
530
-
531
-extern int is_bare_repository_cfg;
532
-int is_bare_repository(void);
455
int is_inside_git_dir(void);
534
-extern char *git_work_tree_cfg;
456
int is_inside_work_tree(void);
536
-const char *get_git_dir(void);
537
-const char *get_git_common_dir(void);
538
-const char *get_object_directory(void);
539
-char *get_index_file(void);
540
-char *get_graft_file(struct repository *r);
541
-void set_git_dir(const char *path, int make_realpath);
457
int get_common_dir_noenv(struct strbuf *sb, const char *gitdir);
458
int get_common_dir(struct strbuf *sb, const char *gitdir);
544
-const char *get_git_namespace(void);
545
-const char *strip_namespace(const char *namespaced_ref);
546
-const char *get_git_work_tree(void);
459
460
/*
461
* Return true if the given path is a git directory; note that this _just_
@@ -578,10 +490,6 @@ const char *read_gitfile_gently(const char *path, int *return_error_code);
490
const char *resolve_gitdir_gently(const char *suspect, int *return_error_code);
491
#define resolve_gitdir(path) resolve_gitdir_gently((path), NULL)
492
581
-void set_git_work_tree(const char *tree);
582
-
583
-#define ALTERNATE_DB_ENVIRONMENT "GIT_ALTERNATE_OBJECT_DIRECTORIES"
584
-
493
void setup_work_tree(void);
494
/*
495
* Find the commondir and gitdir of the repository that contains the current
@@ -840,39 +748,7 @@ void set_alternate_index_output(const char *);
748
extern int verify_index_checksum;
749
extern int verify_ce_order;
750
843
-/* Environment bits from configuration mechanism */
844
-extern int trust_executable_bit;
845
-extern int trust_ctime;
846
-extern int check_stat;
751
extern int quote_path_fully;
848
-extern int has_symlinks;
849
-extern int minimum_abbrev, default_abbrev;
850
-extern int ignore_case;
851
-extern int assume_unchanged;
852
-extern int prefer_symlink_refs;
853
-extern int warn_ambiguous_refs;
854
-extern int warn_on_object_refname_ambiguity;
855
-extern char *apply_default_whitespace;
856
-extern char *apply_default_ignorewhitespace;
857
-extern const char *git_attributes_file;
858
-extern const char *git_hooks_path;
859
-extern int zlib_compression_level;
860
-extern int pack_compression_level;
861
-extern size_t packed_git_window_size;
862
-extern size_t packed_git_limit;
863
-extern size_t delta_base_cache_limit;
864
-extern unsigned long big_file_threshold;
865
-extern unsigned long pack_size_limit_cfg;
866
-
867
-/*
868
- * Accessors for the core.sharedrepository config which lazy-load the value
869
- * from the config (if not already set). The "reset" function can be
870
- * used to unset "set" or cached value, meaning that the value will be loaded
871
- * fresh from the config file on the next call to get_shared_repository().
872
- */
873
-void set_shared_repository(int value);
874
-int get_shared_repository(void);
875
-void reset_shared_repository(void);
752
753
/*
754
* These values are used to help identify parts of a repository to fsync.
@@ -930,57 +806,6 @@ enum fsync_method {
806
};
807
808
extern enum fsync_method fsync_method;
933
-extern int core_preload_index;
934
-extern int precomposed_unicode;
935
-extern int protect_hfs;
936
-extern int protect_ntfs;
937
-
938
-extern int core_apply_sparse_checkout;
939
-extern int core_sparse_checkout_cone;
940
-extern int sparse_expect_files_outside_of_patterns;
941
-
942
-/*
943
- * Returns the boolean value of $GIT_OPTIONAL_LOCKS (or the default value).
944
- */
945
-int use_optional_locks(void);
946
-
947
-enum log_refs_config {
948
- LOG_REFS_UNSET = -1,
949
- LOG_REFS_NONE = 0,
950
- LOG_REFS_NORMAL,
951
- LOG_REFS_ALWAYS
952
-};
953
-extern enum log_refs_config log_all_ref_updates;
954
-
955
-enum rebase_setup_type {
956
- AUTOREBASE_NEVER = 0,
957
- AUTOREBASE_LOCAL,
958
- AUTOREBASE_REMOTE,
959
- AUTOREBASE_ALWAYS
960
-};
961
-
962
-enum push_default_type {
963
- PUSH_DEFAULT_NOTHING = 0,
964
- PUSH_DEFAULT_MATCHING,
965
- PUSH_DEFAULT_SIMPLE,
966
- PUSH_DEFAULT_UPSTREAM,
967
- PUSH_DEFAULT_CURRENT,
968
- PUSH_DEFAULT_UNSPECIFIED
969
-};
970
-
971
-extern enum rebase_setup_type autorebase;
972
-extern enum push_default_type push_default;
973
-
974
-enum object_creation_mode {
975
- OBJECT_CREATION_USES_HARDLINKS = 0,
976
- OBJECT_CREATION_USES_RENAMES = 1
977
-};
978
-
979
-extern enum object_creation_mode object_creation_mode;
980
-
981
-extern char *notes_ref_name;
982
-
983
-extern int grafts_replace_parents;
809
810
/*
811
* GIT_REPO_VERSION is the version we write by default. The
@@ -989,8 +814,6 @@ extern int grafts_replace_parents;
814
*/
815
#define GIT_REPO_VERSION 0
816
#define GIT_REPO_VERSION_READ 1
992
-extern int repository_format_precious_objects;
993
-extern int repository_format_worktree_config;
817
818
/*
819
* You _have_ to initialize a `struct repository_format` using
@@ -1362,21 +1185,6 @@ struct pack_entry {
1185
struct packed_git *p;
1186
};
1187
1365
-/*
1366
- * Create a temporary file rooted in the object database directory, or
1367
- * die on failure. The filename is taken from "pattern", which should have the
1368
- * usual "XXXXXX" trailer, and the resulting filename is written into the
1369
- * "template" buffer. Returns the open descriptor.
1370
- */
1371
-int odb_mkstemp(struct strbuf *temp_filename, const char *pattern);
1372
-
1373
-/*
1374
- * Create a pack .keep file named "name" (which should generally be the output
1375
- * of odb_pack_name). Returns a file descriptor opened for writing, or -1 on
1376
- * error.
1377
- */
1378
-int odb_pack_keep(const char *name);
1379
-
1188
/*
1189
* Set this to 0 to prevent oid_object_info_extended() from fetching missing
1190
* blobs. This has a difference only if extensions.partialClone is set.
@@ -1388,11 +1196,6 @@ extern int fetch_if_missing;
1196
/* Dumb servers support */
1197
int update_server_info(int);
1198
1391
-const char *get_log_output_encoding(void);
1392
-const char *get_commit_output_encoding(void);
1393
-
1394
-extern const char *git_commit_encoding;
1395
-extern const char *git_log_output_encoding;
1199
extern const char *git_mailmap_file;
1200
extern const char *git_mailmap_blob;
1201
@@ -1429,10 +1232,6 @@ int decimal_width(uintmax_t);
1232
int check_pager_config(const char *cmd);
1233
void prepare_pager_args(struct child_process *, const char *pager);
1234
1432
-extern const char *editor_program;
1433
-extern const char *askpass_program;
1434
-extern const char *excludes_file;
1435
-
1235
/* base85 */
1236
int decode_85(char *dst, const char *line, int linelen);
1237
void encode_85(char *buf, const unsigned char *data, int bytes);
@@ -1536,10 +1335,4 @@ void stat_validity_update(struct stat_validity *sv, int fd);
1335
1336
int versioncmp(const char *s1, const char *s2);
1337
1539
-/*
1540
- * Should we print an ellipsis after an abbreviated SHA-1 value
1541
- * when doing diff-raw output or indicating a detached HEAD?
1542
- */
1543
-int print_sha1_ellipsis(void);
1544
-
1338
#endif /* CACHE_H */
combine-diff.c
+1
@@ -4,6 +4,7 @@
4
#include "blob.h"
5
#include "diff.h"
6
#include "diffcore.h"
7
+#include "environment.h"
8
#include "hex.h"
9
#include "quote.h"
10
#include "xdiff-interface.h"
compat/mingw.c
+1
@@ -11,6 +11,7 @@
11
#include "../alloc.h"
12
#include "win32/lazyload.h"
13
#include "../config.h"
14
+#include "../environment.h"
15
#include "../wrapper.h"
16
#include "dir.h"
17
#include "gettext.h"
compat/precompose_utf8.c
+1
@@ -7,6 +7,7 @@
7
8
#include "cache.h"
9
#include "config.h"
10
+#include "environment.h"
11
#include "gettext.h"
12
#include "utf8.h"
13
#include "precompose_utf8.h"
connect.c
+1
@@ -1,6 +1,7 @@
1
#include "git-compat-util.h"
2
#include "cache.h"
3
#include "config.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
7
#include "pkt-line.h"
daemon.c
+1
@@ -2,6 +2,7 @@
2
#include "abspath.h"
3
#include "alloc.h"
4
#include "config.h"
5
+#include "environment.h"
6
#include "pkt-line.h"
7
#include "run-command.h"
8
#include "strbuf.h"
diff.c
+1
@@ -5,6 +5,7 @@
5
#include "abspath.h"
6
#include "alloc.h"
7
#include "config.h"
8
+#include "environment.h"
9
#include "gettext.h"
10
#include "tempfile.h"
11
#include "quote.h"
dir.c
+1
@@ -10,6 +10,7 @@
10
#include "alloc.h"
11
#include "config.h"
12
#include "dir.h"
13
+#include "environment.h"
14
#include "gettext.h"
15
#include "object-store.h"
16
#include "attr.h"
editor.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "abspath.h"
3
#include "config.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "strbuf.h"
7
#include "strvec.h"
entry.c
+1
@@ -2,6 +2,7 @@
2
#include "blob.h"
3
#include "object-store.h"
4
#include "dir.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "streaming.h"
environment.h
+213
@@ -3,6 +3,8 @@
3
4
#include "strvec.h"
5
6
+struct repository;
7
+
8
/*
9
* The character that begins a commented line in user-editable file
10
* that is subject to stripspace.
@@ -16,4 +18,215 @@ extern int auto_comment_line_char;
18
*/
19
const char *getenv_safe(struct strvec *argv, const char *name);
20
21
+/* Double-check local_repo_env below if you add to this list. */
22
+#define GIT_DIR_ENVIRONMENT "GIT_DIR"
23
+#define GIT_COMMON_DIR_ENVIRONMENT "GIT_COMMON_DIR"
24
+#define GIT_NAMESPACE_ENVIRONMENT "GIT_NAMESPACE"
25
+#define GIT_WORK_TREE_ENVIRONMENT "GIT_WORK_TREE"
26
+#define GIT_PREFIX_ENVIRONMENT "GIT_PREFIX"
27
+#define DEFAULT_GIT_DIR_ENVIRONMENT ".git"
28
+#define DB_ENVIRONMENT "GIT_OBJECT_DIRECTORY"
29
+#define INDEX_ENVIRONMENT "GIT_INDEX_FILE"
30
+#define GRAFT_ENVIRONMENT "GIT_GRAFT_FILE"
31
+#define GIT_SHALLOW_FILE_ENVIRONMENT "GIT_SHALLOW_FILE"
32
+#define TEMPLATE_DIR_ENVIRONMENT "GIT_TEMPLATE_DIR"
33
+#define CONFIG_ENVIRONMENT "GIT_CONFIG"
34
+#define CONFIG_DATA_ENVIRONMENT "GIT_CONFIG_PARAMETERS"
35
+#define CONFIG_COUNT_ENVIRONMENT "GIT_CONFIG_COUNT"
36
+#define EXEC_PATH_ENVIRONMENT "GIT_EXEC_PATH"
37
+#define CEILING_DIRECTORIES_ENVIRONMENT "GIT_CEILING_DIRECTORIES"
38
+#define NO_REPLACE_OBJECTS_ENVIRONMENT "GIT_NO_REPLACE_OBJECTS"
39
+#define GIT_REPLACE_REF_BASE_ENVIRONMENT "GIT_REPLACE_REF_BASE"
40
+#define GITATTRIBUTES_FILE ".gitattributes"
41
+#define INFOATTRIBUTES_FILE "info/attributes"
42
+#define ATTRIBUTE_MACRO_PREFIX "[attr]"
43
+#define GITMODULES_FILE ".gitmodules"
44
+#define GITMODULES_INDEX ":.gitmodules"
45
+#define GITMODULES_HEAD "HEAD:.gitmodules"
46
+#define GIT_NOTES_REF_ENVIRONMENT "GIT_NOTES_REF"
47
+#define GIT_NOTES_DEFAULT_REF "refs/notes/commits"
48
+#define GIT_NOTES_DISPLAY_REF_ENVIRONMENT "GIT_NOTES_DISPLAY_REF"
49
+#define GIT_NOTES_REWRITE_REF_ENVIRONMENT "GIT_NOTES_REWRITE_REF"
50
+#define GIT_NOTES_REWRITE_MODE_ENVIRONMENT "GIT_NOTES_REWRITE_MODE"
51
+#define GIT_LITERAL_PATHSPECS_ENVIRONMENT "GIT_LITERAL_PATHSPECS"
52
+#define GIT_GLOB_PATHSPECS_ENVIRONMENT "GIT_GLOB_PATHSPECS"
53
+#define GIT_NOGLOB_PATHSPECS_ENVIRONMENT "GIT_NOGLOB_PATHSPECS"
54
+#define GIT_ICASE_PATHSPECS_ENVIRONMENT "GIT_ICASE_PATHSPECS"
55
+#define GIT_QUARANTINE_ENVIRONMENT "GIT_QUARANTINE_PATH"
56
+#define GIT_OPTIONAL_LOCKS_ENVIRONMENT "GIT_OPTIONAL_LOCKS"
57
+#define GIT_TEXT_DOMAIN_DIR_ENVIRONMENT "GIT_TEXTDOMAINDIR"
58
+
59
+/*
60
+ * Environment variable used in handshaking the wire protocol.
61
+ * Contains a colon ':' separated list of keys with optional values
62
+ * 'key[=value]'. Presence of unknown keys and values must be
63
+ * ignored.
64
+ */
65
+#define GIT_PROTOCOL_ENVIRONMENT "GIT_PROTOCOL"
66
+/* HTTP header used to handshake the wire protocol */
67
+#define GIT_PROTOCOL_HEADER "Git-Protocol"
68
+
69
+/*
70
+ * This environment variable is expected to contain a boolean indicating
71
+ * whether we should or should not treat:
72
+ *
73
+ * GIT_DIR=foo.git git ...
74
+ *
75
+ * as if GIT_WORK_TREE=. was given. It's not expected that users will make use
76
+ * of this, but we use it internally to communicate to sub-processes that we
77
+ * are in a bare repo. If not set, defaults to true.
78
+ */
79
+#define GIT_IMPLICIT_WORK_TREE_ENVIRONMENT "GIT_IMPLICIT_WORK_TREE"
80
+
81
+/*
82
+ * Repository-local GIT_* environment variables; these will be cleared
83
+ * when git spawns a sub-process that runs inside another repository.
84
+ * The array is NULL-terminated, which makes it easy to pass in the "env"
85
+ * parameter of a run-command invocation, or to do a simple walk.
86
+ */
87
+extern const char * const local_repo_env[];
88
+
89
+void setup_git_env(const char *git_dir);
90
+
91
+/*
92
+ * Returns true iff we have a configured git repository (either via
93
+ * setup_git_directory, or in the environment via $GIT_DIR).
94
+ */
95
+int have_git_dir(void);
96
+
97
+extern int is_bare_repository_cfg;
98
+int is_bare_repository(void);
99
+extern char *git_work_tree_cfg;
100
+const char *get_git_dir(void);
101
+const char *get_git_common_dir(void);
102
+const char *get_object_directory(void);
103
+char *get_index_file(void);
104
+char *get_graft_file(struct repository *r);
105
+void set_git_dir(const char *path, int make_realpath);
106
+const char *get_git_namespace(void);
107
+const char *strip_namespace(const char *namespaced_ref);
108
+const char *get_git_work_tree(void);
109
+void set_git_work_tree(const char *tree);
110
+
111
+#define ALTERNATE_DB_ENVIRONMENT "GIT_ALTERNATE_OBJECT_DIRECTORIES"
112
+
113
+/* Environment bits from configuration mechanism */
114
+extern int trust_executable_bit;
115
+extern int trust_ctime;
116
+extern int check_stat;
117
+extern int has_symlinks;
118
+extern int minimum_abbrev, default_abbrev;
119
+extern int ignore_case;
120
+extern int assume_unchanged;
121
+extern int prefer_symlink_refs;
122
+extern int warn_ambiguous_refs;
123
+extern int warn_on_object_refname_ambiguity;
124
+extern char *apply_default_whitespace;
125
+extern char *apply_default_ignorewhitespace;
126
+extern const char *git_attributes_file;
127
+extern const char *git_hooks_path;
128
+extern int zlib_compression_level;
129
+extern int pack_compression_level;
130
+extern size_t packed_git_window_size;
131
+extern size_t packed_git_limit;
132
+extern size_t delta_base_cache_limit;
133
+extern unsigned long big_file_threshold;
134
+extern unsigned long pack_size_limit_cfg;
135
+
136
+/*
137
+ * Accessors for the core.sharedrepository config which lazy-load the value
138
+ * from the config (if not already set). The "reset" function can be
139
+ * used to unset "set" or cached value, meaning that the value will be loaded
140
+ * fresh from the config file on the next call to get_shared_repository().
141
+ */
142
+void set_shared_repository(int value);
143
+int get_shared_repository(void);
144
+void reset_shared_repository(void);
145
+
146
+extern int core_preload_index;
147
+extern int precomposed_unicode;
148
+extern int protect_hfs;
149
+extern int protect_ntfs;
150
+
151
+extern int core_apply_sparse_checkout;
152
+extern int core_sparse_checkout_cone;
153
+extern int sparse_expect_files_outside_of_patterns;
154
+
155
+/*
156
+ * Returns the boolean value of $GIT_OPTIONAL_LOCKS (or the default value).
157
+ */
158
+int use_optional_locks(void);
159
+
160
+enum log_refs_config {
161
+ LOG_REFS_UNSET = -1,
162
+ LOG_REFS_NONE = 0,
163
+ LOG_REFS_NORMAL,
164
+ LOG_REFS_ALWAYS
165
+};
166
+extern enum log_refs_config log_all_ref_updates;
167
+
168
+enum rebase_setup_type {
169
+ AUTOREBASE_NEVER = 0,
170
+ AUTOREBASE_LOCAL,
171
+ AUTOREBASE_REMOTE,
172
+ AUTOREBASE_ALWAYS
173
+};
174
+
175
+enum push_default_type {
176
+ PUSH_DEFAULT_NOTHING = 0,
177
+ PUSH_DEFAULT_MATCHING,
178
+ PUSH_DEFAULT_SIMPLE,
179
+ PUSH_DEFAULT_UPSTREAM,
180
+ PUSH_DEFAULT_CURRENT,
181
+ PUSH_DEFAULT_UNSPECIFIED
182
+};
183
+
184
+extern enum rebase_setup_type autorebase;
185
+extern enum push_default_type push_default;
186
+
187
+enum object_creation_mode {
188
+ OBJECT_CREATION_USES_HARDLINKS = 0,
189
+ OBJECT_CREATION_USES_RENAMES = 1
190
+};
191
+
192
+extern enum object_creation_mode object_creation_mode;
193
+
194
+extern char *notes_ref_name;
195
+
196
+extern int grafts_replace_parents;
197
+
198
+extern int repository_format_precious_objects;
199
+extern int repository_format_worktree_config;
200
+
201
+/*
202
+ * Create a temporary file rooted in the object database directory, or
203
+ * die on failure. The filename is taken from "pattern", which should have the
204
+ * usual "XXXXXX" trailer, and the resulting filename is written into the
205
+ * "template" buffer. Returns the open descriptor.
206
+ */
207
+int odb_mkstemp(struct strbuf *temp_filename, const char *pattern);
208
+
209
+/*
210
+ * Create a pack .keep file named "name" (which should generally be the output
211
+ * of odb_pack_name). Returns a file descriptor opened for writing, or -1 on
212
+ * error.
213
+ */
214
+int odb_pack_keep(const char *name);
215
+
216
+const char *get_log_output_encoding(void);
217
+const char *get_commit_output_encoding(void);
218
+
219
+extern const char *git_commit_encoding;
220
+extern const char *git_log_output_encoding;
221
+
222
+extern const char *editor_program;
223
+extern const char *askpass_program;
224
+extern const char *excludes_file;
225
+
226
+/*
227
+ * Should we print an ellipsis after an abbreviated SHA-1 value
228
+ * when doing diff-raw output or indicating a detached HEAD?
229
+ */
230
+int print_sha1_ellipsis(void);
231
+
232
#endif
exec-cmd.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "abspath.h"
3
+#include "environment.h"
4
#include "exec-cmd.h"
5
#include "gettext.h"
6
#include "quote.h"
fetch-pack.c
+1
@@ -2,6 +2,7 @@
2
#include "alloc.h"
3
#include "repository.h"
4
#include "config.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "lockfile.h"
fsmonitor.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "config.h"
3
#include "dir.h"
4
+#include "environment.h"
5
#include "ewah/ewok.h"
6
#include "fsmonitor.h"
7
#include "fsmonitor-ipc.h"
gettext.c
+1
@@ -4,6 +4,7 @@
4
5
#include "cache.h"
6
#include "abspath.h"
7
+#include "environment.h"
8
#include "exec-cmd.h"
9
#include "gettext.h"
10
#include "strbuf.h"
git.c
+1
@@ -1,5 +1,6 @@
1
#include "builtin.h"
2
#include "config.h"
3
+#include "environment.h"
4
#include "exec-cmd.h"
5
#include "gettext.h"
6
#include "help.h"
http-backend.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "alloc.h"
3
#include "config.h"
4
+#include "environment.h"
5
#include "hex.h"
6
#include "repository.h"
7
#include "refs.h"
http-push.c
+1
@@ -1,4 +1,5 @@
1
#include "cache.h"
2
+#include "environment.h"
3
#include "hex.h"
4
#include "repository.h"
5
#include "commit.h"
log-tree.c
+1
@@ -2,6 +2,7 @@
2
#include "commit-reach.h"
3
#include "config.h"
4
#include "diff.h"
5
+#include "environment.h"
6
#include "hex.h"
7
#include "object-store.h"
8
#include "repository.h"
ls-refs.c
+1
@@ -1,4 +1,5 @@
1
#include "cache.h"
2
+#include "environment.h"
3
#include "gettext.h"
4
#include "hex.h"
5
#include "repository.h"
mailmap.c
+1
@@ -1,4 +1,5 @@
1
#include "cache.h"
2
+#include "environment.h"
3
#include "string-list.h"
4
#include "mailmap.h"
5
#include "object-store.h"
merge-ort.c
+1
@@ -26,6 +26,7 @@
26
#include "diff.h"
27
#include "diffcore.h"
28
#include "dir.h"
29
+#include "environment.h"
30
#include "gettext.h"
31
#include "hex.h"
32
#include "entry.h"
merge-recursive.c
+1
@@ -17,6 +17,7 @@
17
#include "diff.h"
18
#include "diffcore.h"
19
#include "dir.h"
20
+#include "environment.h"
21
#include "gettext.h"
22
#include "hex.h"
23
#include "ll-merge.h"
name-hash.c
+1
@@ -6,6 +6,7 @@
6
* Copyright (C) 2008 Linus Torvalds
7
*/
8
#include "cache.h"
9
+#include "environment.h"
10
#include "gettext.h"
11
#include "thread-utils.h"
12
#include "trace2.h"
notes-utils.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "config.h"
3
#include "commit.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "refs.h"
7
#include "notes-utils.h"
notes.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "config.h"
3
+#include "environment.h"
4
#include "hex.h"
5
#include "notes.h"
6
#include "object-store.h"
object-file.c
+1
@@ -10,6 +10,7 @@
10
#include "abspath.h"
11
#include "alloc.h"
12
#include "config.h"
13
+#include "environment.h"
14
#include "gettext.h"
15
#include "hex.h"
16
#include "string-list.h"
object-name.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "config.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "hex.h"
6
#include "tag.h"
pack-bitmap-write.c
+1
@@ -1,5 +1,6 @@
1
#include "git-compat-util.h"
2
#include "alloc.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "hex.h"
6
#include "object-store.h"
pack-check.c
+1
@@ -1,4 +1,5 @@
1
#include "cache.h"
2
+#include "environment.h"
3
#include "hex.h"
4
#include "repository.h"
5
#include "pack.h"
pack-write.c
+1
@@ -1,4 +1,5 @@
1
#include "cache.h"
2
+#include "environment.h"
3
#include "gettext.h"
4
#include "hex.h"
5
#include "pack.h"
packfile.c
+1
@@ -1,5 +1,6 @@
1
#include "git-compat-util.h"
2
#include "alloc.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "hex.h"
6
#include "list.h"
parse-options-cb.c
+1
@@ -4,6 +4,7 @@
4
#include "cache.h"
5
#include "commit.h"
6
#include "color.h"
7
+#include "environment.h"
8
#include "gettext.h"
9
#include "string-list.h"
10
#include "strvec.h"
path.c
+1
@@ -3,6 +3,7 @@
3
*/
4
#include "cache.h"
5
#include "abspath.h"
6
+#include "environment.h"
7
#include "gettext.h"
8
#include "hex.h"
9
#include "repository.h"
pathspec.c
+1
@@ -2,6 +2,7 @@
2
#include "abspath.h"
3
#include "config.h"
4
#include "dir.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "pathspec.h"
8
#include "attr.h"
preload-index.c
+1
@@ -4,6 +4,7 @@
4
#include "cache.h"
5
#include "pathspec.h"
6
#include "dir.h"
7
+#include "environment.h"
8
#include "fsmonitor.h"
9
#include "gettext.h"
10
#include "config.h"
pretty.c
+1
@@ -2,6 +2,7 @@
2
#include "alloc.h"
3
#include "config.h"
4
#include "commit.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "utf8.h"
prompt.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "config.h"
3
+#include "environment.h"
4
#include "run-command.h"
5
#include "strbuf.h"
6
#include "prompt.h"
protocol.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "config.h"
3
+#include "environment.h"
4
#include "protocol.h"
5
6
static enum protocol_version parse_protocol_version(const char *value)
prune-packed.c
+1
@@ -1,4 +1,5 @@
1
#include "cache.h"
2
+#include "environment.h"
3
#include "gettext.h"
4
#include "object-store.h"
5
#include "packfile.h"
range-diff.c
+1
@@ -1,4 +1,5 @@
1
#include "cache.h"
2
+#include "environment.h"
3
#include "gettext.h"
4
#include "range-diff.h"
5
#include "string-list.h"
read-cache.c
+1
@@ -18,6 +18,7 @@
18
#include "tree.h"
19
#include "commit.h"
20
#include "blob.h"
21
+#include "environment.h"
22
#include "gettext.h"
23
#include "resolve-undo.h"
24
#include "run-command.h"
rebase-interactive.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "commit.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "sequencer.h"
6
#include "rebase-interactive.h"
ref-filter.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "alloc.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "hex.h"
6
#include "parse-options.h"
refs.c
+1
@@ -5,6 +5,7 @@
5
#include "cache.h"
6
#include "alloc.h"
7
#include "config.h"
8
+#include "environment.h"
9
#include "hashmap.h"
10
#include "gettext.h"
11
#include "hex.h"
refs/files-backend.c
+1
@@ -1,5 +1,6 @@
1
#include "../cache.h"
2
#include "../config.h"
3
+#include "../environment.h"
4
#include "../gettext.h"
5
#include "../hex.h"
6
#include "../refs.h"
remote-curl.c
+1
@@ -1,6 +1,7 @@
1
#include "git-compat-util.h"
2
#include "alloc.h"
3
#include "config.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
7
#include "remote.h"
remote.c
+1
@@ -2,6 +2,7 @@
2
#include "abspath.h"
3
#include "alloc.h"
4
#include "config.h"
5
+#include "environment.h"
6
#include "gettext.h"
7
#include "hex.h"
8
#include "remote.h"
revision.c
+1
@@ -1,6 +1,7 @@
1
#include "git-compat-util.h"
2
#include "alloc.h"
3
#include "config.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
7
#include "object-store.h"
run-command.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "run-command.h"
3
+#include "environment.h"
4
#include "exec-cmd.h"
5
#include "gettext.h"
6
#include "sigchain.h"
server-info.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "alloc.h"
3
#include "dir.h"
4
+#include "environment.h"
5
#include "hex.h"
6
#include "repository.h"
7
#include "refs.h"
setup.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "abspath.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "repository.h"
6
#include "config.h"
sparse-index.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "alloc.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "repository.h"
6
#include "sparse-index.h"
streaming.c
+1
@@ -2,6 +2,7 @@
2
* Copyright (c) 2011, Google Inc.
3
*/
4
#include "cache.h"
5
+#include "environment.h"
6
#include "streaming.h"
7
#include "repository.h"
8
#include "object-store.h"
submodule-config.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "alloc.h"
3
#include "dir.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "hex.h"
7
#include "repository.h"
submodule.c
+1
@@ -8,6 +8,7 @@
8
#include "dir.h"
9
#include "diff.h"
10
#include "commit.h"
11
+#include "environment.h"
12
#include "gettext.h"
13
#include "hex.h"
14
#include "revision.h"
t/helper/test-fast-rebase.c
+1
@@ -15,6 +15,7 @@
15
#include "cache.h"
16
#include "cache-tree.h"
17
#include "commit.h"
18
+#include "environment.h"
19
#include "gettext.h"
20
#include "hex.h"
21
#include "lockfile.h"
t/helper/test-lazy-init-name-hash.c
+1
@@ -1,6 +1,7 @@
1
#define USE_THE_INDEX_VARIABLE
2
#include "test-tool.h"
3
#include "cache.h"
4
+#include "environment.h"
5
#include "parse-options.h"
6
7
static int single;
t/helper/test-path-utils.c
+1
@@ -1,6 +1,7 @@
1
#include "test-tool.h"
2
#include "cache.h"
3
#include "abspath.h"
4
+#include "environment.h"
5
#include "string-list.h"
6
#include "utf8.h"
7
t/helper/test-repository.c
+1
@@ -3,6 +3,7 @@
3
#include "commit-graph.h"
4
#include "commit.h"
5
#include "config.h"
6
+#include "environment.h"
7
#include "hex.h"
8
#include "object-store.h"
9
#include "object.h"
tag.c
+1
@@ -1,4 +1,5 @@
1
#include "cache.h"
2
+#include "environment.h"
3
#include "tag.h"
4
#include "object-store.h"
5
#include "commit.h"
tmp-objdir.c
+1
@@ -3,6 +3,7 @@
3
#include "abspath.h"
4
#include "chdir-notify.h"
5
#include "dir.h"
6
+#include "environment.h"
7
#include "sigchain.h"
8
#include "string-list.h"
9
#include "strbuf.h"
trace.c
+1
@@ -23,6 +23,7 @@
23
24
#include "cache.h"
25
#include "abspath.h"
26
+#include "environment.h"
27
#include "quote.h"
28
#include "wrapper.h"
29
transport-helper.c
+1
@@ -4,6 +4,7 @@
4
#include "run-command.h"
5
#include "commit.h"
6
#include "diff.h"
7
+#include "environment.h"
8
#include "gettext.h"
9
#include "hex.h"
10
#include "revision.h"
transport.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "alloc.h"
3
#include "config.h"
4
+#include "environment.h"
5
#include "hex.h"
6
#include "transport.h"
7
#include "hook.h"
unpack-trees.c
+1
@@ -3,6 +3,7 @@
3
#include "repository.h"
4
#include "config.h"
5
#include "dir.h"
6
+#include "environment.h"
7
#include "gettext.h"
8
#include "hex.h"
9
#include "tree.h"
upload-pack.c
+1
@@ -1,5 +1,6 @@
1
#include "cache.h"
2
#include "config.h"
3
+#include "environment.h"
4
#include "gettext.h"
5
#include "hex.h"
6
#include "refs.h"
worktree.c
+1
@@ -1,6 +1,7 @@
1
#include "cache.h"
2
#include "abspath.h"
3
#include "alloc.h"
4
+#include "environment.h"
5
#include "gettext.h"
6
#include "repository.h"
7
#include "refs.h"