debian/rules should be producing architecture independent packages
[stgit/dwhite.git] / t / t1203-push-conflict.sh
blob96fee15a8340534e7f22cca3c232c1101252cd11
1 #!/bin/sh
3 # Copyright (c) 2006 David Kågedal
6 test_description='Exercise push conflicts.
8 Test that the index has no modifications after a push with conflicts.
11 . ./test-lib.sh
13 test_expect_success \
14 'Initialize the StGIT repository' \
15 'stg init
18 test_expect_success \
19 'Create the first patch' \
21 stg new foo -m foo &&
22 echo foo > test &&
23 echo fie > test2 &&
24 git add test test2 &&
25 stg refresh &&
26 stg pop
29 test_expect_success \
30 'Create the second patch' \
32 stg new bar -m bar &&
33 echo bar > test &&
34 git add test &&
35 stg refresh
38 test_expect_success \
39 'Push the first patch with conflict' \
41 conflict_old stg push foo
44 test_expect_success \
45 'Show the, now empty, first patch' \
47 ! stg show foo | grep -q -e "^diff "
50 test_expect_success \
51 'Check that the index has the non-conflict updates' \
53 git diff --cached --stat | grep -q -e "^ test2 | *1 "
56 test_expect_success \
57 'Check that pop will fail while there are unmerged conflicts' \
59 command_error stg pop
62 test_expect_success \
63 'Resolve the conflict' \
65 echo resolved > test &&
66 git add test &&
67 stg refresh
70 test_done