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>
This commit is contained in:
parent
2f93541d88
commit
0eea5a6e91
@ -783,7 +783,7 @@ static void write_pack_file(void)
|
|||||||
utb.modtime = --last_mtime;
|
utb.modtime = --last_mtime;
|
||||||
if (utime(pack_tmp_name, &utb) < 0)
|
if (utime(pack_tmp_name, &utb) < 0)
|
||||||
warning("failed utime() on %s: %s",
|
warning("failed utime() on %s: %s",
|
||||||
tmpname, strerror(errno));
|
pack_tmp_name, strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enough space for "-<sha-1>.pack"? */
|
/* Enough space for "-<sha-1>.pack"? */
|
||||||
|
Loading…
Reference in New Issue
Block a user