Skip to content

Commit

Permalink
write_pack_file: use correct variable in diagnostic
Browse files Browse the repository at this point in the history
'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>
  • Loading branch information
Sun He authored and Junio C Hamano committed Mar 3, 2014
1 parent 2f93541 commit 0eea5a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion builtin/pack-objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"? */
Expand Down

0 comments on commit 0eea5a6

Please sign in to comment.