3 # Copyright (c) 2006 Catalin Marinas
6 test_description
='Branch cloning.
8 Exercises branch cloning options.
14 'Create a Git commit' \
22 'Try to create a patch in a Git branch' \
24 command_error stg new p0 -m "p0"
28 'Clone the current Git branch' \
30 stg branch --clone foo &&
32 test "$(stg series --applied -c)" -eq 1
36 'Clone the current StGit branch' \
38 stg branch --clone bar &&
39 test "$(stg series --applied -c)" -eq 1 &&
40 test "$(git config --get branch.bar.description)" = "clone of \"foo\"" &&
42 test "$(stg series --applied -c)" -eq 2
50 grep -E "^bar-[0-9]+-[0-9]+"
54 'Invalid clone args' \
56 command_error stg branch --clone bname extra