summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e89e2ed)
raw | patch | inline | side by side (parent: e89e2ed)
author | Alexander Potashev <aspotashev@gmail.com> | |
Sun, 4 Jan 2009 18:38:41 +0000 (21:38 +0300) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 5 Jan 2009 21:01:01 +0000 (13:01 -0800) |
LF at the end of format strings given to die() is redundant because
die already adds one on its own.
Signed-off-by: Alexander Potashev <aspotashev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
die already adds one on its own.
Signed-off-by: Alexander Potashev <aspotashev@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
16 files changed:
builtin-cat-file.c | patch | blob | history | |
builtin-clone.c | patch | blob | history | |
builtin-fetch.c | patch | blob | history | |
builtin-init-db.c | patch | blob | history | |
builtin-log.c | patch | blob | history | |
builtin-mailinfo.c | patch | blob | history | |
builtin-merge-recursive.c | patch | blob | history | |
builtin-update-index.c | patch | blob | history | |
connect.c | patch | blob | history | |
daemon.c | patch | blob | history | |
diff.c | patch | blob | history | |
git.c | patch | blob | history | |
grep.c | patch | blob | history | |
imap-send.c | patch | blob | history | |
index-pack.c | patch | blob | history | |
pack-redundant.c | patch | blob | history |
diff --git a/builtin-cat-file.c b/builtin-cat-file.c
index 30d00a66649f749c8cf6e657734045382bc29e13..8fad19daedef8a38674ee35cd543983bad610857 100644 (file)
--- a/builtin-cat-file.c
+++ b/builtin-cat-file.c
break;
default:
- die("git cat-file: unknown option: %s\n", exp_type);
+ die("git cat-file: unknown option: %s", exp_type);
}
if (!buf)
diff --git a/builtin-clone.c b/builtin-clone.c
index 2feac9c5cb8e85ae2b25c5a7a0a602e84e210f4a..f1a1a0c36591d1936088a180e3c0a8ca5e7b0757 100644 (file)
--- a/builtin-clone.c
+++ b/builtin-clone.c
dir = opendir(src->buf);
if (!dir)
- die("failed to open %s\n", src->buf);
+ die("failed to open %s", src->buf);
if (mkdir(dest->buf, 0777)) {
if (errno != EEXIST)
- die("failed to create directory %s\n", dest->buf);
+ die("failed to create directory %s", dest->buf);
else if (stat(dest->buf, &buf))
- die("failed to stat %s\n", dest->buf);
+ die("failed to stat %s", dest->buf);
else if (!S_ISDIR(buf.st_mode))
- die("%s exists and is not a directory\n", dest->buf);
+ die("%s exists and is not a directory", dest->buf);
}
strbuf_addch(src, '/');
}
if (unlink(dest->buf) && errno != ENOENT)
- die("failed to unlink %s\n", dest->buf);
+ die("failed to unlink %s", dest->buf);
if (!option_no_hardlinks) {
if (!link(src->buf, dest->buf))
continue;
if (option_local)
- die("failed to create link %s\n", dest->buf);
+ die("failed to create link %s", dest->buf);
option_no_hardlinks = 1;
}
if (copy_file(dest->buf, src->buf, 0666))
- die("failed to copy file to %s\n", dest->buf);
+ die("failed to copy file to %s", dest->buf);
}
closedir(dir);
}
diff --git a/builtin-fetch.c b/builtin-fetch.c
index 7568163af24df630c215e05b6082ed764150a315..de6f3074b1121fdbcbe8bf0593dee446a17fb08e 100644 (file)
--- a/builtin-fetch.c
+++ b/builtin-fetch.c
{
int r = transport_set_option(transport, name, value);
if (r < 0)
- die("Option \"%s\" value \"%s\" is not valid for %s\n",
+ die("Option \"%s\" value \"%s\" is not valid for %s",
name, value, transport->url);
if (r > 0)
warning("Option \"%s\" is ignored for %s\n",
diff --git a/builtin-init-db.c b/builtin-init-db.c
index d30c3fe2ca542b061ab8b7a7696cdd5416e17147..ee3911f8eef5c00eeb4868c843f2b8c5c83d688d 100644 (file)
--- a/builtin-init-db.c
+++ b/builtin-init-db.c
}
}
else if (share && adjust_shared_perm(dir))
- die("Could not make %s writable by group\n", dir);
+ die("Could not make %s writable by group", dir);
}
static void copy_templates_1(char *path, int baselen,
diff --git a/builtin-log.c b/builtin-log.c
index bc4e1e9654abf68967027676b4e06ebf69c79ed4..4a02ee987ac421f3a89a53873f00d50760cd0044 100644 (file)
--- a/builtin-log.c
+++ b/builtin-log.c
committer = git_committer_info(IDENT_ERROR_ON_NO_NAME);
endpos = strchr(committer, '>');
if (!endpos)
- die("bogus committer info %s\n", committer);
+ die("bogus committer info %s", committer);
add_signoff = xmemdupz(committer, endpos - committer + 1);
}
else if (!strcmp(argv[i], "--attach")) {
diff --git a/builtin-mailinfo.c b/builtin-mailinfo.c
index e890f7a6d1ff7248aed4f03ebbcdfafd7e472dad..f7c8c08b320c99d8bf96443ae57aa33c1de7e8c0 100644 (file)
--- a/builtin-mailinfo.c
+++ b/builtin-mailinfo.c
return;
out = reencode_string(line->buf, metainfo_charset, charset);
if (!out)
- die("cannot convert from %s to %s\n",
+ die("cannot convert from %s to %s",
charset, metainfo_charset);
strbuf_attach(line, out, strlen(out), strlen(out));
}
index 6b534c1a66bf7a4abbe0f38add7585dee65a6a44..703045bfc84a804f5cf58537117fb17859951f7e 100644 (file)
}
if (argc < 4)
- die("Usage: %s <base>... -- <head> <remote> ...\n", argv[0]);
+ die("Usage: %s <base>... -- <head> <remote> ...", argv[0]);
for (i = 1; i < argc; ++i) {
if (!strcmp(argv[i], "--"))
diff --git a/builtin-update-index.c b/builtin-update-index.c
index 65d5775107f9013526cc5b288a80a00b449e8814..560497750586ec61be4e34de6dedd9c307129817 100644 (file)
--- a/builtin-update-index.c
+++ b/builtin-update-index.c
static void read_head_pointers(void)
{
if (read_ref("HEAD", head_sha1))
- die("No HEAD -- no initial commit yet?\n");
+ die("No HEAD -- no initial commit yet?");
if (read_ref("MERGE_HEAD", merge_head_sha1)) {
fprintf(stderr, "Not in the middle of a merge.\n");
exit(0);
diff --git a/connect.c b/connect.c
index 2f55ad2c256bc01b3062b99251af4386eef5af22..2f23ab3b87e500137fe0af957901c30e61434564 100644 (file)
--- a/connect.c
+++ b/connect.c
/* Not numeric */
struct servent *se = getservbyname(port,"tcp");
if ( !se )
- die("Unknown port %s\n", port);
+ die("Unknown port %s", port);
nport = se->s_port;
}
diff --git a/daemon.c b/daemon.c
index 60bf6c743c559676f0c9e0ff8dc6d9a5dfede195..540700ee844eb47c417c10a04a85af9af5b23569 100644 (file)
--- a/daemon.c
+++ b/daemon.c
gai = getaddrinfo(listen_addr, pbuf, &hints, &ai0);
if (gai)
- die("getaddrinfo() failed: %s\n", gai_strerror(gai));
+ die("getaddrinfo() failed: %s", gai_strerror(gai));
for (ai = ai0; ai; ai = ai->ai_next) {
int sockfd;
index 0484601f42a8aeac408d560091d341f571f231dd..c159a5fc658d762fba10800e5b828ad2f5c00b90 100644 (file)
--- a/diff.c
+++ b/diff.c
if (lstat(one->path, &st) < 0)
die("stat %s", one->path);
if (index_path(one->sha1, one->path, &st, 0))
- die("cannot hash %s\n", one->path);
+ die("cannot hash %s", one->path);
}
}
else
index e0d90713584b9743efd8d52e6b5c262d2135908b..a53e24feae183b77986947f9b120a02bc1c18113 100644 (file)
--- a/git.c
+++ b/git.c
if (ret >= 0 && WIFEXITED(ret) &&
WEXITSTATUS(ret) != 127)
exit(WEXITSTATUS(ret));
- die("Failed to run '%s' when expanding alias '%s'\n",
+ die("Failed to run '%s' when expanding alias '%s'",
alias_string + 1, alias_command);
}
count = split_cmdline(alias_string, &new_argv);
index 600f69f2fe2a0271f4bdf736f95f70c8f7381aa4..49e93199658e6b9214839232b5b464b7d9e76a7f 100644 (file)
--- a/grep.c
+++ b/grep.c
h |= match_expr_eval(o, x->u.binary.right, bol, eol, ctx, 1);
break;
default:
- die("Unexpected node type (internal error) %d\n", x->node);
+ die("Unexpected node type (internal error) %d", x->node);
}
if (collect_hits)
x->hit |= h;
diff --git a/imap-send.c b/imap-send.c
index 3703dbd1af65c30806a98f0d2d3dc14b8b0e9798..c3fa0df855395f08a53c8619af50d28a478bbb3d 100644 (file)
--- a/imap-send.c
+++ b/imap-send.c
len = vsnprintf(tmp, sizeof(tmp), fmt, ap);
if (len < 0)
- die("Fatal: Out of memory\n");
+ die("Fatal: Out of memory");
if (len >= sizeof(tmp))
- die("imap command overflow !\n");
+ die("imap command overflow!");
*strp = xmemdupz(tmp, len);
return len;
}
va_start(va, fmt);
if (blen <= 0 || (unsigned)(ret = vsnprintf(buf, blen, fmt, va)) >= (unsigned)blen)
- die("Fatal: buffer too small. Please report a bug.\n");
+ die("Fatal: buffer too small. Please report a bug.");
va_end(va);
return ret;
}
diff --git a/index-pack.c b/index-pack.c
index 60ed41a993bf9e213b7dfde5ff43528eff6b6252..2931511e8cd9f2a825d1eb949858ea9b305c337f 100644 (file)
--- a/index-pack.c
+++ b/index-pack.c
} else
output_fd = open(pack_name, O_CREAT|O_EXCL|O_RDWR, 0600);
if (output_fd < 0)
- die("unable to create %s: %s\n", pack_name, strerror(errno));
+ die("unable to create %s: %s", pack_name, strerror(errno));
pack_fd = output_fd;
} else {
input_fd = open(pack_name, O_RDONLY);
diff --git a/pack-redundant.c b/pack-redundant.c
index 25b81a445c8fafe0c00ce30082b7d9a7c22ccf1e..e93eb966e2ccd4bfe31a89668d55c2276c45b87a 100644 (file)
--- a/pack-redundant.c
+++ b/pack-redundant.c
pll_free(perm_all);
}
if (perm_ok == NULL)
- die("Internal error: No complete sets found!\n");
+ die("Internal error: No complete sets found!");
/* find the permutation with the smallest size */
perm = perm_ok;
struct packed_git *p = packed_git;
if (strlen(filename) < 40)
- die("Bad pack filename: %s\n", filename);
+ die("Bad pack filename: %s", filename);
while (p) {
if (strstr(p->pack_name, filename))
return add_pack(p);
p = p->next;
}
- die("Filename %s not found in packed_git\n", filename);
+ die("Filename %s not found in packed_git", filename);
}
static void load_all(void)
add_pack_file(*(argv + i++));
if (local_packs == NULL)
- die("Zero packs found!\n");
+ die("Zero packs found!");
load_all_objects();