mirror of
https://github.com/git/git.git
synced 2024-11-24 18:33:43 +08:00
merge script: handle -m --log correctly
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>
This commit is contained in:
parent
f5d3a6f575
commit
eeb70b6769
@ -294,12 +294,18 @@ else
|
|||||||
# the given message. If remote is invalid we will die
|
# the given message. If remote is invalid we will die
|
||||||
# later in the common codepath so we discard the error
|
# later in the common codepath so we discard the error
|
||||||
# in this loop.
|
# in this loop.
|
||||||
merge_name=$(for remote
|
merge_msg="$(
|
||||||
|
for remote
|
||||||
do
|
do
|
||||||
merge_name "$remote"
|
merge_name "$remote"
|
||||||
done | git fmt-merge-msg $log_arg
|
done |
|
||||||
)
|
if test "$have_message" = t
|
||||||
merge_msg="${merge_msg:+$merge_msg$LF$LF}$merge_name"
|
then
|
||||||
|
git fmt-merge-msg -m "$merge_msg" $log_arg
|
||||||
|
else
|
||||||
|
git fmt-merge-msg $log_arg
|
||||||
|
fi
|
||||||
|
)"
|
||||||
fi
|
fi
|
||||||
head=$(git rev-parse --verify "$head_arg"^0) || usage
|
head=$(git rev-parse --verify "$head_arg"^0) || usage
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user