test_expect_success 'Initialize StGit stack with two patches' '
stg init &&
touch a &&
- git add a &&
+ stg add a &&
git commit -m a &&
echo 1 > a &&
git commit -a -m p1 &&
test_expect_success 'Push with dirty worktree' '
echo 4 > a &&
- [ "$(echo $(stg applied))" = "p1" ] &&
- [ "$(echo $(stg unapplied))" = "p2" ] &&
- ! stg goto p2 &&
- [ "$(echo $(stg applied))" = "p1" ] &&
- [ "$(echo $(stg unapplied))" = "p2" ] &&
+ [ "$(echo $(stg series --applied --noprefix))" = "p1" ] &&
+ [ "$(echo $(stg series --unapplied --noprefix))" = "p2" ] &&
+ conflict stg goto --keep p2 &&
+ [ "$(echo $(stg series --applied --noprefix))" = "p1" ] &&
+ [ "$(echo $(stg series --unapplied --noprefix))" = "p2" ] &&
[ "$(echo $(cat a))" = "4" ]
'