X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=t%2Ft5520-pull.sh;h=0e5eb678ce6b2f4fad79c39947455e5284313ba4;hb=ba959de165c6fc0d08d851894a98778e739aafc9;hp=0b489f5b1227268c050c1256d105d57d871f5698;hpb=267684f0b7428583ba88c4acc0e9ef322a36b3ff;p=git.git diff --git a/t/t5520-pull.sh b/t/t5520-pull.sh index 0b489f5b1..0e5eb678c 100755 --- a/t/t5520-pull.sh +++ b/t/t5520-pull.sh @@ -46,6 +46,17 @@ test_expect_success 'pulling into void using master:master' ' test_cmp file cloned-uho/file ' +test_expect_success 'pulling into void does not overwrite untracked files' ' + git init cloned-untracked && + ( + cd cloned-untracked && + echo untracked >file && + test_must_fail git pull .. master && + echo untracked >expect && + test_cmp expect file + ) +' + test_expect_success 'test . as a remote' ' git branch copy master && @@ -222,4 +233,11 @@ test_expect_success 'git pull --rebase does not reapply old patches' ' ) ' +test_expect_success 'git pull --rebase against local branch' ' + git checkout -b copy2 to-rebase-orig && + git pull --rebase . to-rebase && + test "conflicting modification" = "$(cat file)" && + test file = "$(cat file2)" +' + test_done