add_file_to_index: skip rehashing if the cached stat already matches
[gitweb.git] / builtin-update-ref.c
index feac2ed12d22dcd23db5823cd32a0f9f1c1c974a..8339cf19e2b68a19e88c1a014c52672bc6f0c7b5 100644 (file)
@@ -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])) {