chiark / gitweb /
stgit.el: Add "d" for a few diff commands, similar to git.el
[stgit] / t / t1303-commit.sh
CommitLineData
9beaff2e
KH
1#!/bin/sh
2test_description='Test stg commit'
3. ./test-lib.sh
4
5test_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.
11test_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
20test_done