Skip to content

Commit

Permalink
merge script: handle -m --log correctly
Browse files Browse the repository at this point in the history
Based on v1.7.1.1~23^2 (merge: --log appends shortlog to message if
specified, 2010-05-11).  Without this change, the scripted
(non-builtin) merge does not pass t7604.

Cc: Tay Ray Chuan <rctay89@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Aug 18, 2010
1 parent f5d3a6f commit eeb70b6
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions contrib/examples/git-merge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -294,12 +294,18 @@ else
# the given message. If remote is invalid we will die
# later in the common codepath so we discard the error
# in this loop.
merge_name=$(for remote
merge_msg="$(
for remote
do
merge_name "$remote"
done | git fmt-merge-msg $log_arg
)
merge_msg="${merge_msg:+$merge_msg$LF$LF}$merge_name"
done |
if test "$have_message" = t
then
git fmt-merge-msg -m "$merge_msg" $log_arg
else
git fmt-merge-msg $log_arg
fi
)"
fi
head=$(git rev-parse --verify "$head_arg"^0) || usage

Expand Down

0 comments on commit eeb70b6

Please sign in to comment.