summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 0ec29a4)
raw | patch | inline | side by side (parent: 0ec29a4)
author | Junio C Hamano <gitster@pobox.com> | |
Sun, 29 Jul 2007 00:20:52 +0000 (17:20 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 30 Jul 2007 06:28:55 +0000 (23:28 -0700) |
Earlier these tools refused to create a reflog entry when the
message given by the calling Porcelain had a LF in it, partially
to keep the file format integrity of reflog file, which is
one-entry-per-line. These tools should not be dictating such a
policy.
Instead, let the codepath to write out the reflog entry worry
about the format integrity and allow messages with LF in them.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
message given by the calling Porcelain had a LF in it, partially
to keep the file format integrity of reflog file, which is
one-entry-per-line. These tools should not be dictating such a
policy.
Instead, let the codepath to write out the reflog entry worry
about the format integrity and allow messages with LF in them.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-symbolic-ref.c | patch | blob | history | |
builtin-update-ref.c | patch | blob | history |
diff --git a/builtin-symbolic-ref.c b/builtin-symbolic-ref.c
index d41b40640b96e7d5568174c7d16088c29d361d42..9eb95e50da5656bc66e9db4d8cd23ef327a5ca8e 100644 (file)
--- a/builtin-symbolic-ref.c
+++ b/builtin-symbolic-ref.c
msg = argv[1];
if (!*msg)
die("Refusing to perform update with empty message");
- if (strchr(msg, '\n'))
- die("Refusing to perform update with \\n in message");
}
else if (!strcmp("--", arg)) {
argc--;
diff --git a/builtin-update-ref.c b/builtin-update-ref.c
index feac2ed12d22dcd23db5823cd32a0f9f1c1c974a..8339cf19e2b68a19e88c1a014c52672bc6f0c7b5 100644 (file)
--- a/builtin-update-ref.c
+++ b/builtin-update-ref.c
msg = argv[++i];
if (!*msg)
die("Refusing to perform update with empty message.");
- if (strchr(msg, '\n'))
- die("Refusing to perform update with \\n in message.");
continue;
}
if (!strcmp("-d", argv[i])) {