]> git.ipfire.org Git - thirdparty/git.git/blobdiff - environment.c
Merge branch 'jk/use-compat-util-in-test-tool'
[thirdparty/git.git] / environment.c
index 6cf00793894f75230e5d66d39d56fe2e5388c8a6..3f3c8746c2b6e30c5d9e40772078a39c3a9638c8 100644 (file)
@@ -8,6 +8,7 @@
  * are.
  */
 #include "cache.h"
+#include "branch.h"
 #include "repository.h"
 #include "config.h"
 #include "refs.h"
@@ -51,7 +52,7 @@ const char *editor_program;
 const char *askpass_program;
 const char *excludes_file;
 enum auto_crlf auto_crlf = AUTO_CRLF_FALSE;
-int check_replace_refs = 1; /* NEEDSWORK: rename to read_replace_refs */
+int read_replace_refs = 1;
 char *git_replace_ref_base;
 enum eol core_eol = EOL_UNSET;
 int global_conv_flags_eol = CONV_EOL_RNDTRP_WARN;
@@ -146,7 +147,7 @@ static char *expand_namespace(const char *raw_namespace)
                        strbuf_addf(&buf, "refs/namespaces/%s", (*c)->buf);
        strbuf_list_free(components);
        if (check_refname_format(buf.buf, 0))
-               die("bad git namespace path \"%s\"", raw_namespace);
+               die(_("bad git namespace path \"%s\""), raw_namespace);
        strbuf_addch(&buf, '/');
        return strbuf_detach(&buf, NULL);
 }
@@ -182,7 +183,7 @@ void setup_git_env(const char *git_dir)
        argv_array_clear(&to_free);
 
        if (getenv(NO_REPLACE_OBJECTS_ENVIRONMENT))
-               check_replace_refs = 0;
+               read_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
@@ -328,7 +329,7 @@ char *get_graft_file(struct repository *r)
 static void set_git_dir_1(const char *path)
 {
        if (setenv(GIT_DIR_ENVIRONMENT, path, 1))
-               die("could not set GIT_DIR to '%s'", path);
+               die(_("could not set GIT_DIR to '%s'"), path);
        setup_git_env(path);
 }