Andrew's git
/
gitweb.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
commit
grep
author
committer
pickaxe
?
re
write_in_full: size_t is unsigned.
[gitweb.git]
/
builtin-update-ref.c
diff --git
a/builtin-update-ref.c
b/builtin-update-ref.c
index f2506fa9762bd9d868076710f38dfc9137186828..b34e5987dd256e0b7d9fae46fe89f66dd18ad91f 100644
(file)
--- 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])) {