summaryrefslogtreecommitdiff
path: root/builtin-update-ref.c
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2007-01-26 10:26:04 (GMT)
committerJunio C Hamano <junkio@cox.net>2007-01-26 10:26:04 (GMT)
commit8ac65937d032ad3e4bda1d7d6a8b924a65a01fb4 (patch)
tree19cbfff3bee291287b79c004e3779083c822b4ab /builtin-update-ref.c
parent8a8169c0398ff9996216381d7688c2ba2d007050 (diff)
downloadgit-8ac65937d032ad3e4bda1d7d6a8b924a65a01fb4.zip
git-8ac65937d032ad3e4bda1d7d6a8b924a65a01fb4.tar.gz
git-8ac65937d032ad3e4bda1d7d6a8b924a65a01fb4.tar.bz2
Make sure we do not write bogus reflog entries.
The file format dictates that entries are LF terminated so the message cannot have one in it. Chomp the message to make sure it only has a single line if necessary, while removing the leading whitespace. Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'builtin-update-ref.c')
-rw-r--r--builtin-update-ref.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/builtin-update-ref.c b/builtin-update-ref.c
index b34e598..f2506fa 100644
--- a/builtin-update-ref.c
+++ b/builtin-update-ref.c
@@ -23,8 +23,6 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
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])) {