]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/fetch.c
memoize common git-path "constant" files
[thirdparty/git.git] / builtin / fetch.c
index 34b6f5ebcad7a80901c60448a45e23b667ba7fbe..df16d0a56e97c1ebbafd3498307901754b6daf64 100644 (file)
@@ -591,7 +591,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
        const char *what, *kind;
        struct ref *rm;
        char *url;
-       const char *filename = dry_run ? "/dev/null" : git_path("FETCH_HEAD");
+       const char *filename = dry_run ? "/dev/null" : git_path_fetch_head();
        int want_status;
 
        fp = fopen(filename, "a");
@@ -834,7 +834,7 @@ static void check_not_current_branch(struct ref *ref_map)
 
 static int truncate_fetch_head(void)
 {
-       const char *filename = git_path("FETCH_HEAD");
+       const char *filename = git_path_fetch_head();
        FILE *fp = fopen(filename, "w");
 
        if (!fp)