diff options
Diffstat (limited to 'environment.c')
-rw-r--r-- | environment.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/environment.c b/environment.c index 3fd4b10845..de8431e01e 100644 --- a/environment.c +++ b/environment.c @@ -27,6 +27,8 @@ int warn_ambiguous_refs = 1; int warn_on_object_refname_ambiguity = 1; int ref_paranoia = -1; int repository_format_precious_objects; +char *repository_format_partial_clone; +const char *core_partial_clone_filter_default; const char *git_commit_encoding; const char *git_log_output_encoding; const char *apply_default_whitespace; @@ -49,7 +51,7 @@ enum auto_crlf auto_crlf = AUTO_CRLF_FALSE; int check_replace_refs = 1; char *git_replace_ref_base; enum eol core_eol = EOL_UNSET; -enum safe_crlf safe_crlf = SAFE_CRLF_WARN; +int global_conv_flags_eol = CONV_EOL_RNDTRP_WARN; unsigned whitespace_rule_cfg = WS_DEFAULT_RULE; enum branch_track git_branch_track = BRANCH_TRACK_REMOTE; enum rebase_setup_type autorebase = AUTOREBASE_NEVER; @@ -76,6 +78,7 @@ int protect_hfs = PROTECT_HFS_DEFAULT; #define PROTECT_NTFS_DEFAULT 0 #endif int protect_ntfs = PROTECT_NTFS_DEFAULT; +const char *core_fsmonitor; /* * The character that begins a commented line in user-editable file @@ -97,7 +100,7 @@ int ignore_untracked_cache_config; /* This is set by setup_git_dir_gently() and/or git_default_config() */ char *git_work_tree_cfg; -static const char *namespace; +static char *namespace; static const char *super_prefix; @@ -152,8 +155,10 @@ void setup_git_env(void) if (getenv(NO_REPLACE_OBJECTS_ENVIRONMENT)) check_replace_refs = 0; replace_ref_base = getenv(GIT_REPLACE_REF_BASE_ENVIRONMENT); + free(git_replace_ref_base); git_replace_ref_base = xstrdup(replace_ref_base ? replace_ref_base : "refs/replace/"); + free(namespace); namespace = expand_namespace(getenv(GIT_NAMESPACE_ENVIRONMENT)); shallow_file = getenv(GIT_SHALLOW_FILE_ENVIRONMENT); if (shallow_file) @@ -336,3 +341,23 @@ void reset_shared_repository(void) { need_shared_repository_from_config = 1; } + +int use_optional_locks(void) +{ + return git_env_bool(GIT_OPTIONAL_LOCKS_ENVIRONMENT, 1); +} + +int print_sha1_ellipsis(void) +{ + /* + * Determine if the calling environment contains the variable + * GIT_PRINT_SHA1_ELLIPSIS set to "yes". + */ + static int cached_result = -1; /* unknown */ + + if (cached_result < 0) { + const char *v = getenv("GIT_PRINT_SHA1_ELLIPSIS"); + cached_result = (v && !strcasecmp(v, "yes")); + } + return cached_result; +} |