(CommandList children: [ (Assignment keyword: Assign_None pairs: [ (assign_pair lhs: (LhsName name:test_description) op: Equal rhs: {(SQ <"pull options">)} spids: [4] ) ] spids: [4] ) (C {(.)} {(./test-lib.sh)}) (C {(test_expect_success)} {(SQ <setup>)} { (SQ <"\n"> <"\tmkdir parent &&\n"> <"\t(cd parent && git init &&\n"> <"\t echo one >file && git add file &&\n"> <"\t git commit -m one)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull -q">)} { (SQ <"\n"> <"\tmkdir clonedq &&\n"> <"\t(cd clonedq && git init &&\n"> <"\tgit pull -q \"../parent\" >out 2>err &&\n"> <"\ttest_must_be_empty err &&\n"> <"\ttest_must_be_empty out)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull -q --rebase">)} { (SQ <"\n"> <"\tmkdir clonedqrb &&\n"> <"\t(cd clonedqrb && git init &&\n"> <"\tgit pull -q --rebase \"../parent\" >out 2>err &&\n"> <"\ttest_must_be_empty err &&\n"> <"\ttest_must_be_empty out &&\n"> <"\tgit pull -q --rebase \"../parent\" >out 2>err &&\n"> <"\ttest_must_be_empty err &&\n"> <"\ttest_must_be_empty out)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull">)} { (SQ <"\n"> <"\tmkdir cloned &&\n"> <"\t(cd cloned && git init &&\n"> <"\tgit pull \"../parent\" >out 2>err &&\n"> <"\ttest -s err &&\n"> <"\ttest_must_be_empty out)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull --rebase">)} { (SQ <"\n"> <"\tmkdir clonedrb &&\n"> <"\t(cd clonedrb && git init &&\n"> <"\tgit pull --rebase \"../parent\" >out 2>err &&\n"> <"\ttest -s err &&\n"> <"\ttest_must_be_empty out)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull -v">)} { (SQ <"\n"> <"\tmkdir clonedv &&\n"> <"\t(cd clonedv && git init &&\n"> <"\tgit pull -v \"../parent\" >out 2>err &&\n"> <"\ttest -s err &&\n"> <"\ttest_must_be_empty out)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull -v --rebase">)} { (SQ <"\n"> <"\tmkdir clonedvrb &&\n"> <"\t(cd clonedvrb && git init &&\n"> <"\tgit pull -v --rebase \"../parent\" >out 2>err &&\n"> <"\ttest -s err &&\n"> <"\ttest_must_be_empty out)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull -v -q">)} { (SQ <"\n"> <"\tmkdir clonedvq &&\n"> <"\t(cd clonedvq && git init &&\n"> <"\tgit pull -v -q \"../parent\" >out 2>err &&\n"> <"\ttest_must_be_empty out &&\n"> <"\ttest_must_be_empty err)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull -q -v">)} { (SQ <"\n"> <"\tmkdir clonedqv &&\n"> <"\t(cd clonedqv && git init &&\n"> <"\tgit pull -q -v \"../parent\" >out 2>err &&\n"> <"\ttest_must_be_empty out &&\n"> <"\ttest -s err)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull --force">)} { (SQ <"\n"> <"\tmkdir clonedoldstyle &&\n"> <"\t(cd clonedoldstyle && git init &&\n"> <"\tcat >>.git/config <<-\\EOF &&\n"> <"\t[remote \"one\"]\n"> <"\t\turl = ../parent\n"> <"\t\tfetch = refs/heads/master:refs/heads/mirror\n"> <"\t[remote \"two\"]\n"> <"\t\turl = ../parent\n"> <"\t\tfetch = refs/heads/master:refs/heads/origin\n"> <"\t[branch \"master\"]\n"> <"\t\tremote = two\n"> <"\t\tmerge = refs/heads/master\n"> <"\tEOF\n"> <"\tgit pull two &&\n"> <"\ttest_commit A &&\n"> <"\tgit branch -f origin &&\n"> <"\tgit pull --all --force\n"> <"\t)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull --all">)} { (SQ <"\n"> <"\tmkdir clonedmulti &&\n"> <"\t(cd clonedmulti && git init &&\n"> <"\tcat >>.git/config <<-\\EOF &&\n"> <"\t[remote \"one\"]\n"> <"\t\turl = ../parent\n"> <"\t\tfetch = refs/heads/*:refs/remotes/one/*\n"> <"\t[remote \"two\"]\n"> <"\t\turl = ../parent\n"> <"\t\tfetch = refs/heads/*:refs/remotes/two/*\n"> <"\t[branch \"master\"]\n"> <"\t\tremote = one\n"> <"\t\tmerge = refs/heads/master\n"> <"\tEOF\n"> <"\tgit pull --all\n"> <"\t)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull --dry-run">)} { (SQ <"\n"> <"\ttest_when_finished \"rm -rf clonedry\" &&\n"> <"\tgit init clonedry &&\n"> <"\t(\n"> <"\t\tcd clonedry &&\n"> <"\t\tgit pull --dry-run ../parent &&\n"> <"\t\ttest_path_is_missing .git/FETCH_HEAD &&\n"> <"\t\ttest_path_is_missing .git/refs/heads/master &&\n"> <"\t\ttest_path_is_missing .git/index &&\n"> <"\t\ttest_path_is_missing file\n"> <"\t)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull --all --dry-run">)} { (SQ <"\n"> <"\ttest_when_finished \"rm -rf cloneddry\" &&\n"> <"\tgit init clonedry &&\n"> <"\t(\n"> <"\t\tcd clonedry &&\n"> <"\t\tgit remote add origin ../parent &&\n"> <"\t\tgit pull --all --dry-run &&\n"> <"\t\ttest_path_is_missing .git/FETCH_HEAD &&\n"> <"\t\ttest_path_is_missing .git/refs/remotes/origin/master &&\n"> <"\t\ttest_path_is_missing .git/index &&\n"> <"\t\ttest_path_is_missing file\n"> <"\t)\n"> ) } ) (C {(test_expect_success)} {(SQ <"git pull --allow-unrelated-histories">)} { (SQ <"\n"> <"\ttest_when_finished \"rm -fr src dst\" &&\n"> <"\tgit init src &&\n"> <"\t(\n"> <"\t\tcd src &&\n"> <"\t\ttest_commit one &&\n"> <"\t\ttest_commit two\n"> <"\t) &&\n"> <"\tgit clone src dst &&\n"> <"\t(\n"> <"\t\tcd src &&\n"> <"\t\tgit checkout --orphan side HEAD^ &&\n"> <"\t\ttest_commit three\n"> <"\t) &&\n"> <"\t(\n"> <"\t\tcd dst &&\n"> <"\t\ttest_must_fail git pull ../src side &&\n"> <"\t\tgit pull --allow-unrelated-histories ../src side\n"> <"\t)\n"> ) } ) (C {(test_done)}) ] )