merge --no-commit: tweak message
We did not distinguish the case the user asked not to make a commit with --no-commit flag and the automerge failed. Tell these cases apart and phrase dying message differently. Signed-off-by: Junio C Hamano <junkio@cox.net>maint
parent
bb5ebed731
commit
695bf722da
11
git-merge.sh
11
git-merge.sh
|
@ -209,6 +209,7 @@ case "$use_strategies" in
|
||||||
esac
|
esac
|
||||||
|
|
||||||
result_tree= best_cnt=-1 best_strategy= wt_strategy=
|
result_tree= best_cnt=-1 best_strategy= wt_strategy=
|
||||||
|
merge_was_ok=
|
||||||
for strategy in $use_strategies
|
for strategy in $use_strategies
|
||||||
do
|
do
|
||||||
test "$wt_strategy" = '' || {
|
test "$wt_strategy" = '' || {
|
||||||
|
@ -228,6 +229,7 @@ do
|
||||||
exit=$?
|
exit=$?
|
||||||
if test "$no_commit" = t && test "$exit" = 0
|
if test "$no_commit" = t && test "$exit" = 0
|
||||||
then
|
then
|
||||||
|
merge_was_ok=t
|
||||||
exit=1 ;# pretend it left conflicts.
|
exit=1 ;# pretend it left conflicts.
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -293,4 +295,11 @@ do
|
||||||
done >"$GIT_DIR/MERGE_HEAD"
|
done >"$GIT_DIR/MERGE_HEAD"
|
||||||
echo $merge_msg >"$GIT_DIR/MERGE_MSG"
|
echo $merge_msg >"$GIT_DIR/MERGE_MSG"
|
||||||
|
|
||||||
die "Automatic merge failed/prevented; fix up by hand"
|
if test "$merge_was_ok" = t
|
||||||
|
then
|
||||||
|
echo >&2 \
|
||||||
|
"Automatic merge went well; stopped before committing as requested"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
die "Automatic merge failed; fix up by hand"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue