t0040-parse-options: improve test coverage
[gitweb.git] / t / t5505-remote.sh
index 949725e9bcc5b4d6358ed28ca5675b92f9b7c7fa..dd2e6ce34e7dff0e59e917fd4e3aefa01181778c 100755 (executable)
@@ -970,6 +970,15 @@ test_expect_success 'get-url on new remote' '
        echo foo | get_url_test --push --all someremote
 '
 
+test_expect_success 'remote set-url with locked config' '
+       test_when_finished "rm -f .git/config.lock" &&
+       git config --get-all remote.someremote.url >expect &&
+       >.git/config.lock &&
+       test_must_fail git remote set-url someremote baz &&
+       git config --get-all remote.someremote.url >actual &&
+       cmp expect actual
+'
+
 test_expect_success 'remote set-url bar' '
        git remote set-url someremote bar &&
        echo bar >expect &&