gitignore: Add ChangeLog to .gitignore
[stgit.git] / t / t1005-branch-delete.sh
blobe061bafe4dcbe8101336328679fbd596a0da0e51
1 #!/bin/sh
3 test_description='Attempt to delete branches'
5 . ./test-lib.sh
7 stg init
9 test_expect_success 'Create a branch (and switch to it)' '
10 stg branch --create foo
13 test_expect_success 'Delete a branch' '
14 stg branch --delete master
17 test_expect_success 'Create a non-StGIT branch and delete it' '
18 git branch bar &&
19 stg branch --delete bar
22 test_expect_success 'Delete a nonexistent branch' '
23 stg branch --delete bar
26 test_expect_success 'Make sure the branch ref was deleted' '
27 [ -z "$(git show-ref | grep master | tee /dev/stderr)" ]
30 test_expect_success 'Make sure the branch config was deleted' '
31 [ -z "$(git config -l | grep branch\\.master | tee /dev/stderr)" ]
34 test_expect_success 'Make sure the branch files were deleted' '
35 [ -z "$(find .git -type f | grep master | tee /dev/stderr)" ]
38 test_done