Skip to content

Commit

Permalink
remove blank filename in error message
Browse files Browse the repository at this point in the history
When write_loose_object() finds that it is unable to
create a temporary file, it complains, for instance:

    unable to create temporary sha1 filename : Too many open files

That extra space was supposed to be the name of the file,
and will be an empty string if the git_mkstemps_mode() fails.

The name of the temporary file is unimportant; delete it.

Signed-off-by: Pete Wyckoff <pw@padd.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Pete Wyckoff authored and Junio C Hamano committed Apr 30, 2012
1 parent 82247e9 commit 5eaeda7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sha1_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -2511,7 +2511,7 @@ static int write_loose_object(const unsigned char *sha1, char *hdr, int hdrlen,
if (errno == EACCES)
return error("insufficient permission for adding an object to repository database %s", get_object_directory());
else
return error("unable to create temporary sha1 filename %s: %s", tmp_file, strerror(errno));
return error("unable to create temporary file: %s", strerror(errno));
}

/* Set it up */
Expand Down

0 comments on commit 5eaeda7

Please sign in to comment.