3 # Copyright (c) 2006 Yann Dirson
6 test_description
='Branch operations.
8 Exercises the "stg branch" commands.
16 'Try to create an stgit branch with a spurious refs/patches/ entry' \
17 'find .git -name foo | xargs rm -rf &&
18 touch .git/refs/patches/foo &&
23 'Check no part of the branch was created' \
24 'test "`find .git -name foo | tee /dev/stderr`" = ".git/refs/patches/foo" &&
25 ( grep foo .git/HEAD; test $? = 1 )
29 'Try to create an stgit branch with a spurious patches/ entry' \
30 'find .git -name foo | xargs rm -rf &&
31 touch .git/patches/foo &&
36 'Check no part of the branch was created' \
37 'test "`find .git -name foo | tee /dev/stderr`" = ".git/patches/foo" &&
38 ( grep foo .git/HEAD; test $? = 1 )
42 'Try to create an stgit branch with an existing git branch by that name' \
43 'find .git -name foo | xargs rm -rf &&
44 cp .git/refs/heads/master .git/refs/heads/foo &&
49 'Check no part of the branch was created' \
50 'test "`find .git -name foo | tee /dev/stderr`" = ".git/refs/heads/foo" &&
51 ( grep foo .git/HEAD; test $? = 1 )
56 'Try to create an stgit branch with an invalid refs/heads/ entry' \
57 'find .git -name foo | xargs rm -rf &&
58 touch .git/refs/heads/foo &&
63 'Check no part of the branch was created' \
64 'test "`find .git -name foo | tee /dev/stderr`" = ".git/refs/heads/foo" &&
65 ( grep foo .git/HEAD; test $? = 1 )