write_in_full: size_t is unsigned.
[gitweb.git] / builtin-update-ref.c
index f2506fa9762bd9d868076710f38dfc9137186828..b34e5987dd256e0b7d9fae46fe89f66dd18ad91f 100644 (file)
@@ -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])) {