Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSun He <sunheehnus@gmail.com>2014-03-02 11:30:11 +0400
committerJunio C Hamano <gitster@pobox.com>2014-03-03 22:43:40 +0400
commit0eea5a6e91d3da6932c13f16fdf4b4e5ed91b93c (patch)
treef596b2d23c8599b020e5e85ab702a2569e99415b /builtin
parent2f93541d88fadd1ff5307d81c2c8921ee3eea058 (diff)
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')
-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"? */