X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=t%2Ft5520-pull.sh;h=997b2db827c4f37512c6b5d2f861e12105e2a32d;hb=4ec22a48c0575c8a303cd00b5ef4b3d703fbf8b3;hp=9484129ca5aafab369a6ee1f7a1264d568f8cb44;hpb=c85c79279df2c8a583d95449d1029baba41f8660;p=git.git diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 9484129ca..997b2db82 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -92,4 +92,22 @@ test_expect_success '--rebase with rebased upstream' ' ' +test_expect_success 'pull --rebase dies early with dirty working directory' ' + + git update-ref refs/remotes/me/copy copy^ && + COPY=$(git rev-parse --verify me/copy) && + git rebase --onto $COPY copy && + git config branch.to-rebase.remote me && + git config branch.to-rebase.merge refs/heads/copy && + git config branch.to-rebase.rebase true && + echo dirty >> file && + git add file && + test_must_fail git pull && + test $COPY = $(git rev-parse --verify me/copy) && + git checkout HEAD -- file && + git pull && + test $COPY != $(git rev-parse --verify me/copy) + +' + test_done