aboutsummaryrefslogtreecommitdiffstats
path: root/environment.c
diff options
context:
space:
mode:
Diffstat (limited to 'environment.c')
-rw-r--r--environment.c48
1 files changed, 12 insertions, 36 deletions
diff --git a/environment.c b/environment.c
index a2ce998081..7c2480b22e 100644
--- a/environment.c
+++ b/environment.c
@@ -16,6 +16,7 @@
#include "convert.h"
#include "environment.h"
#include "gettext.h"
+#include "git-zlib.h"
#include "repository.h"
#include "config.h"
#include "refs.h"
@@ -36,23 +37,17 @@ int ignore_case;
int assume_unchanged;
int is_bare_repository_cfg = -1; /* unspecified */
int warn_on_object_refname_ambiguity = 1;
-int repository_format_precious_objects;
char *git_commit_encoding;
char *git_log_output_encoding;
char *apply_default_whitespace;
char *apply_default_ignorewhitespace;
char *git_attributes_file;
-char *git_hooks_path;
int zlib_compression_level = Z_BEST_SPEED;
int pack_compression_level = Z_DEFAULT_COMPRESSION;
int fsync_object_files = -1;
int use_fsync = -1;
enum fsync_method fsync_method = FSYNC_METHOD_DEFAULT;
enum fsync_component fsync_components = FSYNC_COMPONENTS_DEFAULT;
-size_t packed_git_window_size = DEFAULT_PACKED_GIT_WINDOW_SIZE;
-size_t packed_git_limit = DEFAULT_PACKED_GIT_LIMIT;
-size_t delta_base_cache_limit = 96 * 1024 * 1024;
-unsigned long big_file_threshold = 512 * 1024 * 1024;
char *editor_program;
char *askpass_program;
char *excludes_file;
@@ -85,6 +80,16 @@ int max_allowed_tree_depth =
* the stack overflow can occur.
*/
512;
+#elif defined(GIT_WINDOWS_NATIVE) && defined(__clang__) && defined(__aarch64__)
+ /*
+ * Similar to Visual C, it seems that on Windows/ARM64 the clang-based
+ * builds have a smaller stack space available. When running out of
+ * that stack space, a `STATUS_STACK_OVERFLOW` is produced. When the
+ * Git command was run from an MSYS2 Bash, this unfortunately results
+ * in an exit code 127. Let's prevent that by lowering the maximal
+ * tree depth; This value seems to be low enough.
+ */
+ 1280;
#else
2048;
#endif
@@ -107,10 +112,7 @@ const char *comment_line_str = "#";
char *comment_line_str_to_free;
int auto_comment_line_char;
-/* Parallel index stat data preload? */
-int core_preload_index = 1;
-
-/* This is set by setup_git_dir_gently() and/or git_default_config() */
+/* This is set by setup_git_directory_gently() and/or git_default_config() */
char *git_work_tree_cfg;
/*
@@ -210,32 +212,6 @@ const char *get_commit_output_encoding(void)
return git_commit_encoding ? git_commit_encoding : "UTF-8";
}
-static int the_shared_repository = PERM_UMASK;
-static int need_shared_repository_from_config = 1;
-
-void set_shared_repository(int value)
-{
- the_shared_repository = value;
- need_shared_repository_from_config = 0;
-}
-
-int get_shared_repository(void)
-{
- if (need_shared_repository_from_config) {
- const char *var = "core.sharedrepository";
- const char *value;
- if (!git_config_get_value(var, &value))
- the_shared_repository = git_config_perm(var, value);
- need_shared_repository_from_config = 0;
- }
- return the_shared_repository;
-}
-
-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);