int log_all_ref_updates;
int warn_ambiguous_refs = 1;
int repository_format_version;
-char git_commit_encoding[MAX_ENCODING_LENGTH] = "utf-8";
+char *git_commit_encoding;
+char *git_log_output_encoding;
int shared_repository = PERM_UMASK;
-int deny_non_fast_forwards = 0;
const char *apply_default_whitespace;
int zlib_compression_level = Z_DEFAULT_COMPRESSION;
int pager_in_use;
git_graft_file = getenv(GRAFT_ENVIRONMENT);
if (!git_graft_file)
git_graft_file = xstrdup(git_path("info/grafts"));
+ log_all_ref_updates = !is_bare_git_dir(git_dir);
+}
+
+int is_bare_git_dir (const char *dir)
+{
+ const char *s;
+ if (!strcmp(dir, DEFAULT_GIT_DIR_ENVIRONMENT))
+ return 0;
+ s = strrchr(dir, '/');
+ return !s || strcmp(s + 1, DEFAULT_GIT_DIR_ENVIRONMENT);
}
const char *get_git_dir(void)