3 test_description='Undo external modifications of the stack'
7 # Ignore our own output files.
8 cat > .git/info/exclude <<EOF
13 test_expect_success 'Initialize StGit stack' '
24 cat > expected.txt <<EOF
29 test_expect_success 'Make a git commit and turn it into a patch' '
30 git rev-parse HEAD > head0.txt &&
34 git rev-parse HEAD > head1.txt &&
36 test "$(echo $(stg series))" = "+ p1 > p2" &&
37 test_cmp expected.txt a
40 cat > expected.txt <<EOF
45 test_expect_success 'Undo the patchification' '
47 git rev-parse HEAD > head2.txt &&
48 test_cmp head1.txt head2.txt &&
49 test "$(echo $(stg series))" = "> p1" &&
50 test_cmp expected.txt a
53 cat > expected.txt <<EOF
57 test_expect_success 'Undo the commit' '
59 git rev-parse HEAD > head3.txt &&
60 test_cmp head0.txt head3.txt &&
61 test "$(echo $(stg series))" = "> p1" &&
62 test_cmp expected.txt a