summaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-02-24 06:27:03 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-02-24 06:27:03 (GMT)
commit816c02ce8ecddce065e83db9f4ecb78f6b0e23dc (patch)
treeb85fa8225e982f67dd4e9d516b92c3f03a1f99bc /sha1_file.c
parent1d3d03bbeaaf55844868affc96231930aae792e6 (diff)
parent7bd1527d2d8c80a6e9a0f8583082a5aee5428c68 (diff)
downloadgit-816c02ce8ecddce065e83db9f4ecb78f6b0e23dc.zip
git-816c02ce8ecddce065e83db9f4ecb78f6b0e23dc.tar.gz
git-816c02ce8ecddce065e83db9f4ecb78f6b0e23dc.tar.bz2
Merge fixes early for next maint series.
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 1fd5b79..a80d849 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));