summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f4a1106)
raw | patch | inline | side by side (parent: f4a1106)
author | Alex Riesen <raa.lkml@gmail.com> | |
Thu, 15 Dec 2005 07:47:30 +0000 (08:47 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 22 Dec 2005 07:09:40 +0000 (23:09 -0800) |
fprintf and die sometimes have missing/excessive "\n" in their arguments,
correct the strings where I think it would be appropriate.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
correct the strings where I think it would be appropriate.
Signed-off-by: Alex Riesen <raa.lkml@gmail.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
config.c | patch | blob | history | |
git.c | patch | blob | history | |
receive-pack.c | patch | blob | history | |
sha1_file.c | patch | blob | history | |
show-branch.c | patch | blob | history |
diff --git a/config.c b/config.c
index 5b5a9a2e4c49026db7fcb9953a0ed25432de24e0..992e9884079a1edd5e42a6481ef5c40ac27edfed 100644 (file)
--- a/config.c
+++ b/config.c
store.value_regex = (regex_t*)malloc(sizeof(regex_t));
if (regcomp(store.value_regex, value_regex,
REG_EXTENDED)) {
- fprintf(stderr, "Invalid pattern: %s",
+ fprintf(stderr, "Invalid pattern: %s\n",
value_regex);
free(store.value_regex);
return 6;
index 0fd95bf751cd5abfeb8a95f3b828adde4537dfde..e795ddb8106138920ad02793c4f4b787e05fb4f4 100644 (file)
--- a/git.c
+++ b/git.c
if (*exec_path != '/') {
if (!getcwd(git_command, sizeof(git_command))) {
fprintf(stderr,
- "git: cannot determine current directory");
+ "git: cannot determine current directory\n");
exit(1);
}
len = strlen(git_command);
diff --git a/receive-pack.c b/receive-pack.c
index cbe37e72391c5f22fb21a48fe64232c212ed8709..92878ecac3bdb12efe0d34257852b432558e21f6 100644 (file)
--- a/receive-pack.c
+++ b/receive-pack.c
case -ERR_RUN_COMMAND_WAITPID_WRONG_PID:
die("waitpid is confused");
case -ERR_RUN_COMMAND_WAITPID_SIGNAL:
- fprintf(stderr, "%s died of signal", update_hook);
+ fprintf(stderr, "%s died of signal\n", update_hook);
return -1;
case -ERR_RUN_COMMAND_WAITPID_NOEXIT:
die("%s died strangely", update_hook);
diff --git a/sha1_file.c b/sha1_file.c
index d83d8240d001997acf715a67cd60621d48b51e34..601147351d251b305c122dcfae6dbdae72b08bb5 100644 (file)
--- a/sha1_file.c
+++ b/sha1_file.c
unlink(tmpfile);
if (ret) {
if (ret != EEXIST) {
- fprintf(stderr, "unable to write sha1 filename %s: %s", filename, strerror(ret));
+ fprintf(stderr, "unable to write sha1 filename %s: %s\n", filename, strerror(ret));
return -1;
}
/* FIXME!!! Collision check here ? */
@@ -1313,7 +1313,7 @@ int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned cha
}
if (errno != ENOENT) {
- fprintf(stderr, "sha1 file %s: %s", filename, strerror(errno));
+ fprintf(stderr, "sha1 file %s: %s\n", filename, strerror(errno));
return -1;
}
@@ -1321,7 +1321,7 @@ int write_sha1_file(void *buf, unsigned long len, const char *type, unsigned cha
fd = mkstemp(tmpfile);
if (fd < 0) {
- fprintf(stderr, "unable to create temporary sha1 filename %s: %s", tmpfile, strerror(errno));
+ fprintf(stderr, "unable to create temporary sha1 filename %s: %s\n", tmpfile, strerror(errno));
return -1;
}
size = write(fd, buf + posn, objsize - posn);
if (size <= 0) {
if (!size) {
- fprintf(stderr, "write closed");
+ fprintf(stderr, "write closed\n");
} else {
perror("write ");
}
diff --git a/show-branch.c b/show-branch.c
index c7422460be0a68dc34baa1dc8b66aa44559d56de..3fe62b7177241aaf0512b586e2dfe862d3b66b9c 100644 (file)
--- a/show-branch.c
+++ b/show-branch.c
return 0;
if (MAX_REVS <= ref_name_cnt) {
fprintf(stderr, "warning: ignoring %s; "
- "cannot handle more than %d refs",
+ "cannot handle more than %d refs\n",
refname, MAX_REVS);
return 0;
}
if (MAX_REVS <= num_rev)
die("cannot handle more than %d revs.", MAX_REVS);
if (get_sha1(ref_name[num_rev], revkey))
- die("'%s' is not a valid ref.\n", ref_name[num_rev]);
+ die("'%s' is not a valid ref.", ref_name[num_rev]);
commit = lookup_commit_reference(revkey);
if (!commit)
die("cannot find commit %s (%s)",