summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSun He <sunheehnus@gmail.com>2014-03-02 15:30:11 +0800
committerJunio C Hamano <gitster@pobox.com>2014-03-03 10:43:40 -0800
commit0eea5a6e91d3da6932c13f16fdf4b4e5ed91b93c (patch)
treef596b2d23c8599b020e5e85ab702a2569e99415b
parent2f93541d88fadd1ff5307d81c2c8921ee3eea058 (diff)
downloadgit-sh/write-pack-file-warning-message-fix.tar.gz
write_pack_file: use correct variable in diagnosticsh/write-pack-file-warning-message-fix
'pack_tmp_name' is the subject of the utime() check, so report it in the warning, not the uninitialized 'tmpname' Signed-off-by: Sun He <sunheehnus@gmail.com> Reviewed-by: Eric Sunshine <sunshine@sunshineco.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r--builtin/pack-objects.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c
index dd117b379a..f3a44c4f55 100644
--- a/builtin/pack-objects.c
+++ b/builtin/pack-objects.c
@@ -783,7 +783,7 @@ static void write_pack_file(void)
utb.modtime = --last_mtime;
if (utime(pack_tmp_name, &utb) < 0)
warning("failed utime() on %s: %s",
- tmpname, strerror(errno));
+ pack_tmp_name, strerror(errno));
}
/* Enough space for "-<sha-1>.pack"? */