3 test_description
='Check that pulling a stack ref works'
7 test_create_repo upstream
9 test_expect_success
'Setup upstream with patches' '
11 test_commit_bulk --message="patch %s" --filename=foo.txt --contents="line %s" 3 &&
17 test_expect_success
'Pull master and stack with all applied' '
18 test_create_repo cloned &&
20 git config pull.ff only &&
21 git pull -f ../upstream master:master master.stgit:master.stgit &&
22 [ "$(echo $(stg series --applied --noprefix))" = "patch-1 patch-2 patch-3" ]
26 test_expect_success
'Pull master and stack with unapplied patches' '
31 git pull -f ../upstream master:master master.stgit:master.stgit &&
32 [ "$(echo $(stg series --applied --noprefix))" = "patch-1 patch-2" ] &&
33 [ "$(echo $(stg series --unapplied --noprefix))" = "patch-3" ]