Disable patchlog test for "stg new"
[stgit/dwhite.git] / t / t3000-dirty-merge.sh
blobd87bba17098ec24aaf79505f0c150c3f6b788fb4
1 #!/bin/sh
3 test_description='Try a push that requires merging a file that is dirty'
5 . ./test-lib.sh
7 test_expect_success 'Initialize StGit stack with two patches' '
8 stg init &&
9 touch a &&
10 git add a &&
11 git commit -m a &&
12 echo 1 > a &&
13 git commit -a -m p1 &&
14 echo 2 > a &&
15 git commit -a -m p2 &&
16 stg uncommit -n 2
19 test_expect_success 'Pop one patch and update the other' '
20 stg goto p1 &&
21 echo 3 > a &&
22 stg refresh
25 test_expect_success 'Push with dirty worktree' '
26 echo 4 > a &&
27 [ "$(echo $(stg applied))" = "p1" ] &&
28 [ "$(echo $(stg unapplied))" = "p2" ] &&
29 ! stg goto p2 &&
30 [ "$(echo $(stg applied))" = "p1" ] &&
31 [ "$(echo $(stg unapplied))" = "p2" ] &&
32 [ "$(echo $(cat a))" = "4" ]
35 test_done