builtin/commit.c: memoize git-path for COMMIT_EDITMSG
[gitweb.git] / builtin / fetch.c
index f8455bde7a84e110da182d56f62ac3f89026f55c..1582ca71847fe4d79366e85cbea86f9f64f55b90 100644 (file)
@@ -607,7 +607,7 @@ static int store_updated_refs(const char *raw_url, const char *remote_name,
 
        fp = fopen(filename, "a");
        if (!fp)
-               return error(_("cannot open %s: %s\n"), filename, strerror(errno));
+               return error_errno(_("cannot open %s"), filename);
 
        if (raw_url)
                url = transport_anonymize_url(raw_url);
@@ -848,7 +848,7 @@ static int truncate_fetch_head(void)
        FILE *fp = fopen_for_writing(filename);
 
        if (!fp)
-               return error(_("cannot open %s: %s\n"), filename, strerror(errno));
+               return error_errno(_("cannot open %s"), filename);
        fclose(fp);
        return 0;
 }