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