From f1eccbab638df66a7d8ec881f6f695514b26f44f Mon Sep 17 00:00:00 2001 From: Gerrit Pape Date: Sat, 9 Jun 2007 12:40:35 +0000 Subject: 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 --- t/t3200-branch.sh | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 't') diff --git a/t/t3200-branch.sh b/t/t3200-branch.sh index 6f6d8844e8..f1793d0b9a 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 < 1117150200 +0000 branch: Created from master -- cgit v1.2.1