]> git.ipfire.org Git - thirdparty/git.git/blobdiff - t/t5505-remote.sh
Merge branch 'jk/remote-rename-without-fetch-refspec'
[thirdparty/git.git] / t / t5505-remote.sh
index 9006196ac601e8f93f046b54eafe11aa9df58563..43b7bcd7159c252ff7a2e68dc28fc617649bb658 100755 (executable)
@@ -902,6 +902,17 @@ test_expect_success 'rename a remote renames repo remote.pushDefault but keeps g
        )
 '
 
+test_expect_success 'rename handles remote without fetch refspec' '
+       git clone --bare one no-refspec.git &&
+       # confirm assumption that bare clone does not create refspec
+       test_expect_code 5 \
+               git -C no-refspec.git config --unset-all remote.origin.fetch &&
+       git -C no-refspec.git config remote.origin.url >expect &&
+       git -C no-refspec.git remote rename origin foo &&
+       git -C no-refspec.git config remote.foo.url >actual &&
+       test_cmp expect actual
+'
+
 test_expect_success 'rename does not update a non-default fetch refspec' '
        git clone one four.one &&
        (