Skip to content

Commit 0eea5a6

Browse files
sunheehnusgitster
authored andcommitted
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 <[email protected]> Reviewed-by: Eric Sunshine <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 2f93541 commit 0eea5a6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

builtin/pack-objects.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -783,7 +783,7 @@ static void write_pack_file(void)
783783
utb.modtime = --last_mtime;
784784
if (utime(pack_tmp_name, &utb) < 0)
785785
warning("failed utime() on %s: %s",
786-
tmpname, strerror(errno));
786+
pack_tmp_name, strerror(errno));
787787
}
788788

789789
/* Enough space for "-<sha-1>.pack"? */

0 commit comments

Comments
 (0)