aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndré Goddard Rosa <andre.goddard@gmail.com>2007-11-21 18:59:14 -0200
committerJunio C Hamano <gitster@pobox.com>2007-11-25 16:53:32 -0800
commit84ef033832af9e0be886214c70b2006b08630072 (patch)
tree1b51eff84eb345dc891377bedba645f0bef2f890
parent757f58ed380a17225e8de9f461083a21d0a2c97c (diff)
downloadgit-84ef033832af9e0be886214c70b2006b08630072.tar.gz
git-84ef033832af9e0be886214c70b2006b08630072.tar.xz
Print the real filename that we failed to open.
When we fail to open a temporary file to be renamed to something else, we reported the final filename, not the temporary file we failed to open. Signed-off-by: André Goddard Rosa <andre.goddard@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--http-push.c4
-rw-r--r--http-walker.c4
-rw-r--r--server-info.c2
3 files changed, 5 insertions, 5 deletions
diff --git a/http-push.c b/http-push.c
index 66b81f172..78283b4de 100644
--- a/http-push.c
+++ b/http-push.c
@@ -433,7 +433,7 @@ static void start_fetch_packed(struct transfer_request *request)
packfile = fopen(request->tmpfile, "a");
if (!packfile) {
fprintf(stderr, "Unable to open local file %s for pack",
- filename);
+ request->tmpfile);
remote->can_update_info_refs = 0;
free(url);
return;
@@ -941,7 +941,7 @@ static int fetch_index(unsigned char *sha1)
indexfile = fopen(tmpfile, "a");
if (!indexfile)
return error("Unable to open local file %s for pack index",
- filename);
+ tmpfile);
slot = get_active_slot();
slot->results = &results;
diff --git a/http-walker.c b/http-walker.c
index 444aebf52..a3fb59654 100644
--- a/http-walker.c
+++ b/http-walker.c
@@ -405,7 +405,7 @@ static int fetch_index(struct walker *walker, struct alt_base *repo, unsigned ch
indexfile = fopen(tmpfile, "a");
if (!indexfile)
return error("Unable to open local file %s for pack index",
- filename);
+ tmpfile);
slot = get_active_slot();
slot->results = &results;
@@ -770,7 +770,7 @@ static int fetch_pack(struct walker *walker, struct alt_base *repo, unsigned cha
packfile = fopen(tmpfile, "a");
if (!packfile)
return error("Unable to open local file %s for pack",
- filename);
+ tmpfile);
slot = get_active_slot();
slot->results = &results;
diff --git a/server-info.c b/server-info.c
index 0d1312ca5..a051e49a9 100644
--- a/server-info.c
+++ b/server-info.c
@@ -35,7 +35,7 @@ static int update_info_refs(int force)
safe_create_leading_directories(path0);
info_ref_fp = fopen(path1, "w");
if (!info_ref_fp)
- return error("unable to update %s", path0);
+ return error("unable to update %s", path1);
for_each_ref(add_info_ref, NULL);
fclose(info_ref_fp);
adjust_shared_perm(path1);