chiark / gitweb /
stgit.el: Add "d" for a few diff commands, similar to git.el
[stgit] / t / t1303-commit.sh
1 #!/bin/sh
2 test_description='Test stg commit'
3 . ./test-lib.sh
4
5 test_expect_success 'Initialize the StGIT repository' '
6     stg init
7 '
8
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"
18 '
19
20 test_done