X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-rebase.sh;h=60c458f201f8f98bb1c6e115c009525659c2ee20;hb=660b9c3a4e24ce9a2628f2ec88902e2384d1aade;hp=bdcea0ed703057e08fd4204245f4f0c8a308f8d0;hpb=b52e985a4f824128d01220473b04057a4876060d;p=git.git diff --git a/git-rebase.sh b/git-rebase.sh index bdcea0ed7..60c458f20 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -18,8 +18,7 @@ original and remove the .dotest working files, use the command git rebase --abort instead. Note that if is not specified on the command line, the -currently checked out branch is used. You must be in the top -directory of your project to start (or continue) a rebase. +currently checked out branch is used. Example: git-rebase master~1 topic @@ -63,7 +62,7 @@ continue_merge () { cmt=`cat "$dotest/current"` if ! git diff-index --quiet HEAD -- then - if ! git-commit -C "$cmt" + if ! git commit --no-verify -C "$cmt" then echo "Commit failed, please do not call \"git commit\"" echo "directly, but instead do one of the following: " @@ -208,16 +207,15 @@ do if test -d "$dotest" then move_to_original_branch - rm -r "$dotest" elif test -d .dotest then dotest=.dotest move_to_original_branch - rm -r .dotest else die "No rebase in progress?" fi - git reset --hard ORIG_HEAD + git reset --hard $(cat $dotest/orig-head) + rm -r "$dotest" exit ;; --onto) @@ -377,7 +375,7 @@ fi if test -z "$do_merge" then git format-patch -k --stdout --full-index --ignore-if-in-upstream "$upstream"..ORIG_HEAD | - git am $git_am_opt --binary -3 -k --resolvemsg="$RESOLVEMSG" && + git am $git_am_opt --rebasing --resolvemsg="$RESOLVEMSG" && move_to_original_branch ret=$? test 0 != $ret -a -d .dotest &&