X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=sha1_file.c;h=a80d849f15936c8fa7aa8f362bcb54b98a892f08;hb=c55f3fff35ac34e6d1f0f686e27029612775e51d;hp=1fd5b797a587dfd52a6662fc48c992a5e298f7f8;hpb=98214e96be00c5132047ae80bca20d4690933c33;p=git.git diff --git a/sha1_file.c b/sha1_file.c index 1fd5b797a..a80d849f1 100644 --- a/sha1_file.c +++ b/sha1_file.c @@ -564,7 +564,7 @@ static void prepare_packed_git_one(char *objdir, int local) dir = opendir(path); if (!dir) { if (errno != ENOENT) - error("unable to open object pack directory: %s: %s\n", + error("unable to open object pack directory: %s: %s", path, strerror(errno)); return; } @@ -1513,7 +1513,8 @@ int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer, local = mkstemp(tmpfile); if (local < 0) - return error("Couldn't open %s for %s\n", tmpfile, sha1_to_hex(sha1)); + return error("Couldn't open %s for %s", + tmpfile, sha1_to_hex(sha1)); memset(&stream, 0, sizeof(stream)); @@ -1561,7 +1562,7 @@ int write_sha1_from_fd(const unsigned char *sha1, int fd, char *buffer, } if (memcmp(sha1, real_sha1, 20)) { unlink(tmpfile); - return error("File %s has bad hash\n", sha1_to_hex(sha1)); + return error("File %s has bad hash", sha1_to_hex(sha1)); } return move_temp_to_file(tmpfile, sha1_file_name(sha1));