aboutsummaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorGeert Bosch <bosch@gnat.com>2007-04-05 10:20:55 -0400
committerJunio C Hamano <junkio@cox.net>2007-04-05 14:53:22 -0700
commit01ebb9dc8846af729c13d5d8c9d939a6d1159240 (patch)
tree9f845d14b1dae32599e4c03f96dc5d257a477c89 /t
parent1e31fbe24fac983b0057af39824f73d65dba6502 (diff)
downloadgit-01ebb9dc8846af729c13d5d8c9d939a6d1159240.tar.gz
git-01ebb9dc8846af729c13d5d8c9d939a6d1159240.tar.xz
Fix renaming branch without config file
Make git_config_rename_section return success if no config file exists. Otherwise, renaming a branch would abort, leaving the repository in an inconsistent state. [jc: test] Signed-off-by: Geert Bosch <bosch@gnat.com> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 't')
-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 9558bdb63..ce2c5f41f 100755
--- a/t/t3200-branch.sh
+++ b/t/t3200-branch.sh
@@ -83,6 +83,15 @@ test_expect_failure \
git-branch r &&
git-branch -m q r/q'
+mv .git/config .git/config-saved
+
+test_expect_success 'git branch -m q Q without config should succeed' '
+ git-branch -m q Q &&
+ git-branch -m Q q
+'
+
+mv .git/config-saved .git/config
+
git-config branch.s/s.dummy Hello
test_expect_success \