]> asedeno.scripts.mit.edu Git - git.git/commitdiff
Merge branch 'os/fix-rebase-diff-no-prefix'
authorJunio C Hamano <gitster@pobox.com>
Wed, 15 Sep 2010 19:40:33 +0000 (12:40 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Sep 2010 19:40:33 +0000 (12:40 -0700)
* os/fix-rebase-diff-no-prefix:
  Add --src/dst-prefix to git-formt-patch in git-rebase.sh

1  2 
git-rebase.sh

diff --combined git-rebase.sh
index 7508463b30e7d1659ac9423a19d195e494600bd3,acca22dc783d4a24f86789a65e341b4bd65fe36a..3335cee70b8ea5510f109da83d8470d3bbabab52
@@@ -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)
        -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