aboutsummaryrefslogtreecommitdiff
path: root/t/t3200-branch.sh
diff options
context:
space:
mode:
authorGerrit Pape <pape@smarden.org>2007-06-09 12:40:35 +0000
committerJunio C Hamano <gitster@pobox.com>2007-06-09 11:53:05 -0700
commitf1eccbab638df66a7d8ec881f6f695514b26f44f (patch)
tree6e0cdad8a3154bf0ec71ba4295887c4071bb364e /t/t3200-branch.sh
parente58db03bbee4af96e60b6ac88b84c1c11b8b037e (diff)
downloadgit-f1eccbab638df66a7d8ec881f6f695514b26f44f.tar.gz
git-f1eccbab638df66a7d8ec881f6f695514b26f44f.tar.xz
git-branch: cleanup config file when deleting branches
When deleting branches, remove the sections referring to these branches from the config file. Signed-off-by: Gerrit Pape <pape@smarden.org>
Diffstat (limited to 't/t3200-branch.sh')
-rwxr-xr-xt/t3200-branch.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh
index 6f6d8844e..f1793d0b9 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -171,6 +171,15 @@ test_expect_success 'test tracking setup via --track but deeper' \
test "$(git-config branch.my7.remote)" = local &&
test "$(git-config branch.my7.merge)" = refs/heads/o/o'
+test_expect_success 'test deleting branch deletes branch config' \
+ 'git-branch -d my7 &&
+ test "$(git-config branch.my7.remote)" = "" &&
+ test "$(git-config branch.my7.merge)" = ""'
+
+test_expect_success 'test deleting branch without config' \
+ 'git-branch my7 s &&
+ test "$(git-branch -d my7 2>&1)" = "Deleted branch my7."'
+
# Keep this test last, as it changes the current branch
cat >expect <<EOF
0000000000000000000000000000000000000000 $HEAD $GIT_COMMITTER_NAME <$GIT_COMMITTER_EMAIL> 1117150200 +0000 branch: Created from master