From: Junio C Hamano Date: Wed, 15 Sep 2010 19:40:33 +0000 (-0700) Subject: Merge branch 'os/fix-rebase-diff-no-prefix' X-Git-Tag: v1.7.3-rc2~2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/0c61c6de3497900616b66a65dc41b27544131ed5?ds=inline;hp=-c Merge branch 'os/fix-rebase-diff-no-prefix' * os/fix-rebase-diff-no-prefix: Add --src/dst-prefix to git-formt-patch in git-rebase.sh --- 0c61c6de3497900616b66a65dc41b27544131ed5 diff --combined git-rebase.sh index 7508463b30,acca22dc78..3335cee70b --- a/git-rebase.sh +++ b/git-rebase.sh @@@ -44,7 -44,6 +44,7 @@@ To restore the original branch and sto " unset newbase strategy=recursive +strategy_opts= do_merge= dotest="$GIT_DIR"/rebase-merge prec=4 @@@ -113,7 -112,7 +113,7 @@@ call_merge () then export GIT_MERGE_VERBOSITY=1 fi - git-merge-$strategy "$cmt^" -- "$hd" "$cmt" + eval 'git-merge-$strategy' $strategy_opts '"$cmt^" -- "$hd" "$cmt"' rv=$? case "$rv" in 0) @@@ -295,27 -294,6 +295,27 @@@ d -M|-m|--m|--me|--mer|--merg|--merge) do_merge=t ;; + -X*|--strategy-option*) + case "$#,$1" in + 1,-X|1,--strategy-option) + usage ;; + *,-X|*,--strategy-option) + newopt="$2" + shift ;; + *,--strategy-option=*) + newopt="$(expr " $1" : ' --strategy-option=\(.*\)')" ;; + *,-X*) + newopt="$(expr " $1" : ' -X\(.*\)')" ;; + 1,*) + usage ;; + esac + strategy_opts="$strategy_opts $(git rev-parse --sq-quote "--$newopt")" + do_merge=t + if test -n "$strategy" + then + strategy=recursive + fi + ;; -s=*|--s=*|--st=*|--str=*|--stra=*|--strat=*|--strate=*|\ --strateg=*|--strategy=*|\ -s|--s|--st|--str|--stra|--strat|--strate|--strateg|--strategy) @@@ -566,6 -544,7 +566,7 @@@ f if test -z "$do_merge" then git format-patch -k --stdout --full-index --ignore-if-in-upstream \ + --src-prefix=a/ --dst-prefix=b/ \ --no-renames $root_flag "$revisions" | git am $git_am_opt --rebasing --resolvemsg="$RESOLVEMSG" && move_to_original_branch