summaryrefslogtreecommitdiff
path: root/http-push.c
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 /http-push.c
parent757f58ed380a17225e8de9f461083a21d0a2c97c (diff)
downloadgit-84ef033832af9e0be886214c70b2006b08630072.tar.gz
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>
Diffstat (limited to 'http-push.c')
-rw-r--r--http-push.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/http-push.c b/http-push.c
index 66b81f1726..78283b4de3 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;