debian/rules should be producing architecture independent packages
[stgit/dwhite.git] / t / t1303-commit.sh
blobd53b9f2677a3ab34b6de442e4311262ab0a71609
1 #!/bin/sh
2 test_description='Test stg commit'
3 . ./test-lib.sh
5 test_expect_success 'Initialize the StGIT repository' '
6 stg init
9 # stg commit with top != head should not succeed, since the committed
10 # patches are poptentially lost.
11 test_expect_success 'Commit when top != head (should fail)' '
12 stg new -m foo &&
13 git reset --hard HEAD^ &&
14 h=$(git rev-parse HEAD)
15 command_error stg commit &&
16 test $(git rev-parse HEAD) = $h &&
17 test "$(echo $(stg series))" = "> foo"
20 test_done