summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6dc78e6)
raw | patch | inline | side by side (parent: 6dc78e6)
author | Junio C Hamano <junkio@cox.net> | |
Thu, 23 Feb 2006 01:47:10 +0000 (17:47 -0800) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 23 Feb 2006 03:10:26 +0000 (19:10 -0800) |
Signed-off-by: Junio C Hamano <junkio@cox.net>
commit.c | patch | blob | history | |
http-fetch.c | patch | blob | history | |
read-tree.c | patch | blob | history | |
receive-pack.c | patch | blob | history | |
refs.c | patch | blob | history | |
sha1_file.c | patch | blob | history |
diff --git a/commit.c b/commit.c
index 67e11d7a4f211c1d2cf62635029f60597ff618de..512b5d74d71dba46831192b740680243913166ba 100644 (file)
--- a/commit.c
+++ b/commit.c
if (memcmp(bufptr, "tree ", 5))
return error("bogus commit object %s", sha1_to_hex(item->object.sha1));
if (get_sha1_hex(bufptr + 5, parent) < 0)
- return error("bad tree pointer in commit %s\n", sha1_to_hex(item->object.sha1));
+ return error("bad tree pointer in commit %s",
+ sha1_to_hex(item->object.sha1));
item->tree = lookup_tree(parent);
if (item->tree)
n_refs++;
diff --git a/http-fetch.c b/http-fetch.c
index ce3df5f35c1fe16dbafec299ade95bb706d86e77..8fd9de081fc636dc2d5010caea9686caa901c91f 100644 (file)
--- a/http-fetch.c
+++ b/http-fetch.c
if (obj_req->local < 0) {
obj_req->state = ABORTED;
- error("Couldn't create temporary file %s for %s: %s\n",
+ error("Couldn't create temporary file %s for %s: %s",
obj_req->tmpfile, obj_req->filename, strerror(errno));
return;
}
obj_req->errorstr, obj_req->curl_result,
obj_req->http_code, hex);
} else if (obj_req->zret != Z_STREAM_END) {
- ret = error("File %s (%s) corrupt\n", hex, obj_req->url);
+ ret = error("File %s (%s) corrupt", hex, obj_req->url);
} else if (memcmp(obj_req->sha1, obj_req->real_sha1, 20)) {
- ret = error("File %s has bad hash\n", hex);
+ ret = error("File %s has bad hash", hex);
} else if (obj_req->rename < 0) {
ret = error("unable to write sha1 filename %s",
obj_req->filename);
fetch_alternates(alt->base);
altbase = altbase->next;
}
- return error("Unable to find %s under %s\n", sha1_to_hex(sha1),
+ return error("Unable to find %s under %s", sha1_to_hex(sha1),
alt->base);
}
diff --git a/read-tree.c b/read-tree.c
index 5580f15ba2c89f9fd1ed35de0b0183487d024bf8..0d938724e594b1bc3c573280cfb9affdd136f104 100644 (file)
--- a/read-tree.c
+++ b/read-tree.c
struct cache_entry *oldtree = src[1], *newtree = src[2];
if (merge_size != 2)
- return error("Cannot do a twoway merge of %d trees\n",
+ return error("Cannot do a twoway merge of %d trees",
merge_size);
if (current) {
struct cache_entry *a = src[1];
if (merge_size != 1)
- return error("Cannot do a oneway merge of %d trees\n",
+ return error("Cannot do a oneway merge of %d trees",
merge_size);
if (!a)
diff --git a/receive-pack.c b/receive-pack.c
index eae31e370d44988b9a8ee9ddb6c3191b4f18bf3e..2a3db16d684e3d7ec9bbdd5f80266eb1e4af6f64 100644 (file)
--- a/receive-pack.c
+++ b/receive-pack.c
case -ERR_RUN_COMMAND_WAITPID_WRONG_PID:
return error("waitpid is confused");
case -ERR_RUN_COMMAND_WAITPID_SIGNAL:
- return error("%s died of signal\n", update_hook);
+ return error("%s died of signal", update_hook);
case -ERR_RUN_COMMAND_WAITPID_NOEXIT:
return error("%s died strangely", update_hook);
default:
if (run_update_hook(name, old_hex, new_hex)) {
unlink(lock_name);
cmd->error_string = "hook declined";
- return error("hook declined to update %s\n", name);
+ return error("hook declined to update %s", name);
}
else if (rename(lock_name, name) < 0) {
unlink(lock_name);
index d01fc3984a56e288e175f8201783f18dfe978c10..826ae7ade7b7ebab01f4446ccb135c6f90c5a3a2 100644 (file)
--- a/refs.c
+++ b/refs.c
char term = '\n';
if (write(fd, hex, 40) < 40 ||
write(fd, &term, 1) < 1) {
- error("Couldn't write %s\n", filename);
+ error("Couldn't write %s", filename);
close(fd);
return -1;
}
diff --git a/sha1_file.c b/sha1_file.c
index f4b10894c8be74d3ab3be8ec6d81f35634399010..aa09b4646abff2f82d30c9968ae277d35db8c438 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
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;
}
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));
}
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));