projects
/
git.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
git-fetch: pass --upload-pack to fetch-pack
[git.git]
/
git-merge.sh
diff --git
a/git-merge.sh
b/git-merge.sh
index
d25ae4b
..
0a158ef
100755
(executable)
--- a/
git-merge.sh
+++ b/
git-merge.sh
@@
-3,15
+3,13
@@
# Copyright (c) 2005 Junio C Hamano
#
# Copyright (c) 2005 Junio C Hamano
#
+
+USAGE='[-n] [--no-commit] [-s <strategy>]... <merge-message> <head> <remote>+'
. git-sh-setup
LF='
'
. git-sh-setup
LF='
'
-usage () {
- die "git-merge [-n] [--no-commit] [-s <strategy>]... <merge-message> <head> <remote>+"
-}
-
all_strategies='recursive octopus resolve stupid ours'
default_strategies='recursive'
use_strategies=
all_strategies='recursive octopus resolve stupid ours'
default_strategies='recursive'
use_strategies=
@@
-211,6
+209,7
@@
case "$use_strategies" in
esac
result_tree= best_cnt=-1 best_strategy= wt_strategy=
esac
result_tree= best_cnt=-1 best_strategy= wt_strategy=
+merge_was_ok=
for strategy in $use_strategies
do
test "$wt_strategy" = '' || {
for strategy in $use_strategies
do
test "$wt_strategy" = '' || {
@@
-230,6
+229,7
@@
do
exit=$?
if test "$no_commit" = t && test "$exit" = 0
then
exit=$?
if test "$no_commit" = t && test "$exit" = 0
then
+ merge_was_ok=t
exit=1 ;# pretend it left conflicts.
fi
exit=1 ;# pretend it left conflicts.
fi
@@
-295,4
+295,11
@@
do
done >"$GIT_DIR/MERGE_HEAD"
echo $merge_msg >"$GIT_DIR/MERGE_MSG"
done >"$GIT_DIR/MERGE_HEAD"
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