aboutsummaryrefslogtreecommitdiff
path: root/contrib/examples
diff options
context:
space:
mode:
authorJonathan Nieder <jrnieder@gmail.com>2010-08-17 02:05:32 -0500
committerJunio C Hamano <gitster@pobox.com>2010-08-18 14:02:04 -0700
commite69dccf8cd4576be804597b2960aa7d0020a65db (patch)
treef80eeb6691e0772ee317fafa2e9a6734769b46d7 /contrib/examples
parent5d75a52b3a8870c3c1b27c5d791da5c9267e1fb5 (diff)
downloadgit-e69dccf8cd4576be804597b2960aa7d0020a65db.tar.gz
git-e69dccf8cd4576be804597b2960aa7d0020a65db.tar.xz
merge script: allow custom strategies
The idea comes from v1.6.1-rc1~294^2~7 (builtin-merge: allow using a custom strategy, 2008-07-30). Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/examples')
-rwxr-xr-xcontrib/examples/git-merge.sh8
1 files changed, 6 insertions, 2 deletions
diff --git a/contrib/examples/git-merge.sh b/contrib/examples/git-merge.sh
index 0d53735d6..49d826508 100755
--- a/contrib/examples/git-merge.sh
+++ b/contrib/examples/git-merge.sh
@@ -193,9 +193,13 @@ parse_config () {
shift
case " $all_strategies " in
*" $1 "*)
- use_strategies="$use_strategies$1 " ;;
+ use_strategies="$use_strategies$1 "
+ ;;
*)
- die "available strategies are: $all_strategies" ;;
+ type "git-merge-$1" >/dev/null 2>&1 ||
+ die "available strategies are: $all_strategies"
+ use_strategies="$use_strategies$1 "
+ ;;
esac
;;
-X)