Browse Source

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>
maint
Junio C Hamano 18 years ago
parent
commit
7f9acb2a16
  1. 2
      builtin-update-ref.c
  2. 2
      git-merge.sh

2
builtin-update-ref.c

@ -23,6 +23,8 @@ int cmd_update_ref(int argc, const char **argv, const char *prefix) @@ -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])) {

2
git-merge.sh

@ -7,7 +7,6 @@ USAGE='[-n] [--no-commit] [--squash] [-s <strategy>] [-m=<merge-message>] <commi @@ -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 @@ -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

Loading…
Cancel
Save