diff options
Diffstat (limited to 'builtin-update-ref.c')
-rw-r--r-- | builtin-update-ref.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/builtin-update-ref.c b/builtin-update-ref.c index f2506fa976..b34e5987dd 100644 --- a/builtin-update-ref.c +++ b/builtin-update-ref.c @@ -23,6 +23,8 @@ 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])) { |