Remove the assert in CommitData.parse() function
[stgit] / t / t1002-branch-clone.sh
CommitLineData
09d8f8c5
CM
1#!/bin/sh
2#
3# Copyright (c) 2006 Catalin Marinas
4#
5
06848fab 6test_description='Branch cloning.
09d8f8c5
CM
7
8Exercises branch cloning options.
9'
10
11. ./test-lib.sh
12
13test_expect_success \
14 'Create a GIT commit' \
15 '
16 echo bar > bar.txt &&
c7506039 17 stg add bar.txt &&
09d8f8c5
CM
18 git commit -a -m bar
19 '
20
5f594e90 21test_expect_success \
09d8f8c5
CM
22 'Try to create a patch in a GIT branch' \
23 '
f03004e2 24 command_error stg new p0 -m "p0"
09d8f8c5
CM
25 '
26
27test_expect_success \
28 'Clone the current GIT branch' \
29 '
30 stg branch --clone foo &&
31 stg new p1 -m "p1" &&
f9d9a062 32 test $(stg series --applied -c) -eq 1
09d8f8c5
CM
33 '
34
35test_expect_success \
36 'Clone the current StGIT branch' \
37 '
38 stg branch --clone bar &&
f9d9a062 39 test $(stg series --applied -c) -eq 1 &&
09d8f8c5 40 stg new p2 -m "p2" &&
f9d9a062 41 test $(stg series --applied -c) -eq 2
09d8f8c5
CM
42 '
43
44test_done