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>
Sun He committed
Mar 2, 2014 at 15:30 UTC
0eea5a6e91d3da6932c13f16fdf4b4e5ed91b93c
1 file changed
+1
-1
builtin/pack-objects.c
+1
-1
@@ -783,7 +783,7 @@ static void write_pack_file(void)
783
utb.modtime = --last_mtime;
784
if (utime(pack_tmp_name, &utb) < 0)
785
warning("failed utime() on %s: %s",
786
- tmpname, strerror(errno));
786
+ pack_tmp_name, strerror(errno));
787
}
788
789
/* Enough space for "-<sha-1>.pack"? */