3 # Copyright (c) 2006 Karl Hasselström
6 test_description
='Branch names containing slashes
8 Test a number of operations on a repository that has branch names
9 containing slashes (that is, branches living in a subdirectory of
14 test_expect_success
'Create a patch' \
16 echo "foo" > foo.txt &&
18 stg new foo -m "Add foo.txt" &&
21 test_expect_success
'Old and new id with non-slashy branch' \
28 stg id foo@master//top &&
29 stg id foo@master/top'
31 test_expect_success
'Clone branch to slashier name' \
32 'stg branch --clone x/y/z'
34 test_expect_success
'Try new form of id with slashy branch' \
39 stg id foo@x/y/z//top'
41 test_expect_failure
'Try old id with slashy branch' \
46 test_expect_success
'Create patch in slashy branch' \
47 'echo "bar" >> foo.txt &&
48 stg new bar -m "Add another line" &&
51 test_expect_success
'Rename branches' \
52 'stg branch --rename master goo/gaa &&
53 ! git show-ref --verify --quiet refs/heads/master &&
54 stg branch --rename goo/gaa x1/x2/x3/x4 &&
55 ! git show-ref --verify --quiet refs/heads/goo/gaa &&
56 stg branch --rename x1/x2/x3/x4 servant &&
57 ! git show-ref --verify --quiet refs/heads/x1/x2/x3/x4