Merge branch 'nd/slim-index-pack-memory-usage'
[gitweb.git] / builtin / fetch.c
index f9512652cf1389a770bd94fd170d123206e024c5..7910419c93275c58f4881202905ae1f24bfe8c91 100644 (file)
@@ -588,7 +588,8 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
        struct strbuf note = STRBUF_INIT;
        const char *what, *kind;
        struct ref *rm;
-       char *url, *filename = dry_run ? "/dev/null" : git_path("FETCH_HEAD");
+       char *url;
+       const char *filename = dry_run ? "/dev/null" : git_path("FETCH_HEAD");
        int want_status;
 
        fp = fopen(filename, "a");
@@ -822,7 +823,7 @@ static void check_not_current_branch(struct ref *ref_map)
 
 static int truncate_fetch_head(void)
 {
-       char *filename = git_path("FETCH_HEAD");
+       const char *filename = git_path("FETCH_HEAD");
        FILE *fp = fopen(filename, "w");
 
        if (!fp)