diff options
author | Junio C Hamano <gitster@pobox.com> | 2022-10-10 20:08:39 +0300 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2022-10-10 20:08:39 +0300 |
commit | 20a5dd670c957fa59b420facf63abe61b6b2438a (patch) | |
tree | 2e36f3993e5931b1e0ea398c6f08ae29b60bd05a /t/t5505-remote.sh | |
parent | 7aeb0d4c47878a04e19cffe2ddf20d642df56414 (diff) | |
parent | 5a97b3810946440764a0a9a2292fcfdfa11391d5 (diff) |
Merge branch 'jk/remote-rename-without-fetch-refspec'
"git remote rename" failed to rename a remote without fetch
refspec, which has been corrected.
* jk/remote-rename-without-fetch-refspec:
remote: handle rename of remote without fetch refspec
Diffstat (limited to 't/t5505-remote.sh')
-rwxr-xr-x | t/t5505-remote.sh | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/t/t5505-remote.sh b/t/t5505-remote.sh index 9006196ac6..43b7bcd715 100755 --- a/t/t5505-remote.sh +++ b/t/t5505-remote.sh @@ -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 && ( |