aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2011-02-09 16:41:16 -0800
committerJunio C Hamano <gitster@pobox.com>2011-02-09 16:41:16 -0800
commit06938a37dca9bb19784c1bd41e90c99a7c8f8e5e (patch)
tree25be5b409d7bba815b9e99abc2ccdb4a0230ed2c /contrib
parenta8e4a5943a63c8fd4a3a9b70ccf4608bcc973707 (diff)
parent67ac1e1d57e45899a4dfd900a0249f48507584b5 (diff)
downloadgit-06938a37dca9bb19784c1bd41e90c99a7c8f8e5e.tar.gz
git-06938a37dca9bb19784c1bd41e90c99a7c8f8e5e.tar.xz
Merge branch 'jn/cherry-pick-strategy-option'
* jn/cherry-pick-strategy-option: cherry-pick/revert: add support for -X/--strategy-option
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/examples/git-revert.sh13
1 files changed, 12 insertions, 1 deletions
diff --git a/contrib/examples/git-revert.sh b/contrib/examples/git-revert.sh
index 60a05a8b9..6bf155cbd 100755
--- a/contrib/examples/git-revert.sh
+++ b/contrib/examples/git-revert.sh
@@ -26,6 +26,7 @@ require_work_tree
cd_to_toplevel
no_commit=
+xopt=
while case "$#" in 0) break ;; esac
do
case "$1" in
@@ -44,6 +45,16 @@ do
-x|--i-really-want-to-expose-my-private-commit-object-name)
replay=
;;
+ -X?*)
+ xopt="$xopt$(git rev-parse --sq-quote "--${1#-X}")"
+ ;;
+ --strategy-option=*)
+ xopt="$xopt$(git rev-parse --sq-quote "--${1#--strategy-option=}")"
+ ;;
+ -X|--strategy-option)
+ shift
+ xopt="$xopt$(git rev-parse --sq-quote "--$1")"
+ ;;
-*)
usage
;;
@@ -159,7 +170,7 @@ export GITHEAD_$head GITHEAD_$next
# and $prev on top of us (when reverting), or the change between
# $prev and $commit on top of us (when cherry-picking or replaying).
-git-merge-recursive $base -- $head $next &&
+eval "git merge-recursive $xopt $base -- $head $next" &&
result=$(git-write-tree 2>/dev/null) || {
mv -f .msg "$GIT_DIR/MERGE_MSG"
{