pretty: test --expand-tabs
[gitweb.git] / t / t3200-branch.sh
index dd776b35592f8350d75b50e0f8c7843fd4324ee8..a897248490650ebef1a33a60a1aa9cf4431f06ff 100755 (executable)
@@ -473,6 +473,13 @@ test_expect_success '--unset-upstream should fail if given a non-existent branch
        test_must_fail git branch --unset-upstream i-dont-exist
 '
 
+test_expect_success '--unset-upstream should fail if config is locked' '
+       test_when_finished "rm -f .git/config.lock" &&
+       git branch --set-upstream-to locked &&
+       >.git/config.lock &&
+       test_must_fail git branch --unset-upstream
+'
+
 test_expect_success 'test --unset-upstream on HEAD' '
        git branch my14 &&
        test_config branch.master.remote foo &&