X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5520-pull.sh;h=725771fac167ea5aac8cf65b916c96918b0f5e0d;hb=df4364a42981dec067dbacfd6371d4ca910df48e;hp=9484129ca5aafab369a6ee1f7a1264d568f8cb44;hpb=fae09a8084c9b51632726523b477a78dd28d7d7e;p=git.git diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 9484129ca..725771fac 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -29,6 +29,18 @@ test_expect_success 'checking the results' ' diff file cloned/file ' +test_expect_success 'pulling into void using master:master' ' + mkdir cloned-uho && + ( + cd cloned-uho && + git init && + git pull .. master:master + ) && + test -f file && + test -f cloned-uho/file && + test_cmp file cloned-uho/file +' + test_expect_success 'test . as a remote' ' git branch copy master && @@ -92,4 +104,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