summaryrefslogtreecommitdiff
path: root/builtin/pack-objects.c
diff options
context:
space:
mode:
authorSun He <sunheehnus@gmail.com>2014-03-02 07:30:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2014-03-03 18:43:40 (GMT)
commit0eea5a6e91d3da6932c13f16fdf4b4e5ed91b93c (patch)
treef596b2d23c8599b020e5e85ab702a2569e99415b /builtin/pack-objects.c
parent2f93541d88fadd1ff5307d81c2c8921ee3eea058 (diff)
downloadgit-0eea5a6e91d3da6932c13f16fdf4b4e5ed91b93c.zip
git-0eea5a6e91d3da6932c13f16fdf4b4e5ed91b93c.tar.gz
git-0eea5a6e91d3da6932c13f16fdf4b4e5ed91b93c.tar.bz2
write_pack_file: use correct variable in diagnostic
'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>
Diffstat (limited to 'builtin/pack-objects.c')
-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 dd117b3..f3a44c4 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"? */