@matheusbsbs / matheus-bagliano / commits / 7f9acb2a16
Fork 0

git-merge: leave sensible reflog message when used as the first level UI.

It used to throw potentially multi-line log message at reflog. Just record the heads that were given to be merged at the command line and the action. Revert the removal of the check in "git-update-ref -m" I made earlier which was only a work-around for this. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Jan 26, 2007 at 15:09 UTC 7f9acb2a16473e5ba6d44231d2fc844ca8bb9817
2 files changed +3 -1
builtin-update-ref.c
+2
@@ -23,6 +23,8 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix)
23 msg = argv[++i];
24 if (!*msg)
25 die("Refusing to perform update with empty message.");
26 + if (strchr(msg, '\n'))
27 + die("Refusing to perform update with \\n in message.");
28 continue;
29 }
30 if (!strcmp("-d", argv[i])) {
git-merge.sh
+1 -1
@@ -7,7 +7,6 @@ USAGE='[-n] [--no-commit] [--squash] [-s <strategy>] [-m=<merge-message>] <commi
7
8 SUBDIRECTORY_OK=Yes
9 . git-sh-setup
10 -set_reflog_action "merge $*"
10 require_work_tree
11 cd_to_toplevel
12
@@ -217,6 +216,7 @@ head=$(git-rev-parse --verify "$head_arg"^0) || usage
216
217 # All the rest are remote heads
218 test "$#" = 0 && usage ;# we need at least one remote head.
219 +set_reflog_action "merge $*"
220
221 remoteheads=
222 for remote