parse-opt: optionally show "--no-" option string
[gitweb.git] / environment.c
index 0693cd9a42adf4914bb219ecf24fc6d5da7aafd3..8f5eaa7dd89cbedd5a89e11f0ea24b29701b33c9 100644 (file)
@@ -42,6 +42,15 @@ enum safe_crlf safe_crlf = SAFE_CRLF_WARN;
 unsigned whitespace_rule_cfg = WS_DEFAULT_RULE;
 enum branch_track git_branch_track = BRANCH_TRACK_REMOTE;
 enum rebase_setup_type autorebase = AUTOREBASE_NEVER;
+enum push_default_type push_default = PUSH_DEFAULT_MATCHING;
+#ifndef OBJECT_CREATION_MODE
+#define OBJECT_CREATION_MODE OBJECT_CREATION_USES_HARDLINKS
+#endif
+enum object_creation_mode object_creation_mode = OBJECT_CREATION_MODE;
+int grafts_replace_parents = 1;
+
+/* Parallel index stat data preload? */
+int core_preload_index = 0;
 
 /* This is set by setup_git_dir_gently() and/or git_default_config() */
 char *git_work_tree_cfg;
@@ -71,7 +80,7 @@ static void setup_git_env(void)
        }
        git_graft_file = getenv(GRAFT_ENVIRONMENT);
        if (!git_graft_file)
-               git_graft_file = xstrdup(git_path("info/grafts"));
+               git_graft_file = git_pathdup("info/grafts");
 }
 
 int is_bare_repository(void)
@@ -118,7 +127,7 @@ const char *get_git_work_tree(void)
                        work_tree = git_work_tree_cfg;
                        /* make_absolute_path also normalizes the path */
                        if (work_tree && !is_absolute_path(work_tree))
-                               work_tree = xstrdup(make_absolute_path(git_path(work_tree)));
+                               work_tree = xstrdup(make_absolute_path(git_path("%s", work_tree)));
                } else if (work_tree)
                        work_tree = xstrdup(make_absolute_path(work_tree));
                git_work_tree_initialized = 1;