X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=git-rebase.sh;h=fa95009091525eb9ea65bce1e08f293dfd1eddca;hb=a60d2d8f2dbeb7025e04dd65fc2dedd8271c9cc6;hp=49c8f12e51153f5c7ecbdc5a1778c24ba28f428f;hpb=c1067050ce58b5b39f528fe634732da858664603;p=git.git diff --git a/git-rebase.sh b/git-rebase.sh index 49c8f12e..fa950090 100755 --- a/git-rebase.sh +++ b/git-rebase.sh @@ -33,7 +33,8 @@ test "$different1$different2" = "" || die "Your working tree does not match $ours_symbolic." git-read-tree -m -u $ours $upstream && -git-rev-parse --verify "$upstream^0" >"$GIT_DIR/HEAD" || exit +new_head=$(git-rev-parse --verify "$upstream^0") && +git-update-ref HEAD "$new_head" || exit tmp=.rebase-tmp$$ fail=$tmp-fail @@ -50,7 +51,7 @@ do continue ;; esac echo >&2 "* Applying: $msg" - S=`cat "$GIT_DIR/HEAD"` && + S=$(git-rev-parse --verify HEAD) && git-cherry-pick --replay $commit || { echo >&2 "* Not applying the patch and continuing." echo $commit >>$fail