Merge branch 'jc/am-i-v-fix' into maint
[gitweb.git] / t / t5505-remote.sh
index dfaf9d9f68939f0c39a512c478265b4aa227c973..013e03dee2651f6891782325671f0764bb02f41f 100755 (executable)
@@ -932,6 +932,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 &&