Skip to content

Commit

Permalink
git-merge: leave sensible reflog message when used as the first level…
Browse files Browse the repository at this point in the history
… 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 <[email protected]>
  • Loading branch information
Junio C Hamano committed Jan 26, 2007
1 parent 8ac6593 commit 7f9acb2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions builtin-update-ref.c
Original file line number Diff line number Diff line change
Expand Up @@ -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])) {
Expand Down
2 changes: 1 addition & 1 deletion git-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 7f9acb2

Please sign in to comment.