aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--builtin-update-ref.c2
-rwxr-xr-xgit-merge.sh2
2 files changed, 3 insertions, 1 deletions
diff --git a/builtin-update-ref.c b/builtin-update-ref.c
index f2506fa97..b34e5987d 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])) {
diff --git a/git-merge.sh b/git-merge.sh
index 7b590268e..656869101 100755
--- a/git-merge.sh
+++ b/git-merge.sh
@@ -7,7 +7,6 @@ USAGE='[-n] [--no-commit] [--squash] [-s <strategy>] [-m=<merge-message>] <commi
SUBDIRECTORY_OK=Yes
. git-sh-setup
-set_reflog_action "merge $*"
require_work_tree
cd_to_toplevel
@@ -217,6 +216,7 @@ head=$(git-rev-parse --verify "$head_arg"^0) || usage
# All the rest are remote heads
test "$#" = 0 && usage ;# we need at least one remote head.
+set_reflog_action "merge $*"
remoteheads=
for remote