diff options
author | Junio C Hamano <junkio@cox.net> | 2006-02-22 17:47:10 -0800 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2006-02-22 19:10:26 -0800 |
commit | bd2afde8a38b97391b22afebf15c583fb0fffacb (patch) | |
tree | d2a4357e278f350999c1d991533016231d237abb /sha1_file.c | |
parent | 6dc78e696b8597204b903073da932fc5ed0f419e (diff) | |
download | git-bd2afde8a38b97391b22afebf15c583fb0fffacb.tar.gz |
Give no terminating LF to error() function.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r-- | sha1_file.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sha1_file.c b/sha1_file.c index f4b10894c8..aa09b4646a 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)); |