From 8ac65937d032ad3e4bda1d7d6a8b924a65a01fb4 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 26 Jan 2007 02:26:04 -0800 Subject: 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 --- builtin-update-ref.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'builtin-update-ref.c') diff --git a/builtin-update-ref.c b/builtin-update-ref.c index b34e5987dd..f2506fa976 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])) { -- cgit v1.2.3