Repository navigation
Update the remote url if it changed. - #8132
Conversation
Co-Authored-By: Katrina Uychaco <[email protected]>
niik
left a comment
There was a problem hiding this comment.
Hey @probablycorey, super sorry for the wait here. I've provided a few initial thoughts. I apologize for this dragging out for so long but this type of change scares the living daylights outta me and I want to be confident we don't ship something which ends up breaking people's ability to push or fetch because of something we've overlooked.
I'm absolutely onboard with the general approach here, it's just that I want to be confident that we've done our best to consider the inevitable edge cases too.
Co-Authored-By: evelyn masso <[email protected]>
Co-Authored-By: evelyn masso <[email protected]>
Co-Authored-By: evelyn masso <[email protected]>
|
@tierninho this should be ready enough for QA testing! Please follow steps at #3855 (comment) as well as #3855 🙏 I just tested #3855 (comment) on Mac and things looked good. Worth noting is that it took a while for the repo name change to show up in Desktop (I'm gonna guess like 10 seconds or so). So if you don't see the update immediately try again in a bit. |
outofambit
left a comment
There was a problem hiding this comment.
this looks good! left a couple small suggestions, but nothing blocking. excited to see this on beta!
|
Confirming all looks good in OSX. Currently blocked on Windows testing for the time being. Will circle back in due time. |
Co-Authored-By: evelyn masso <[email protected]>
Co-Authored-By: evelyn masso <[email protected]>
tierninho
left a comment
There was a problem hiding this comment.
Confirming all looks good on Windows 10. In all OS, there is a slight delay in getting Desktop to update the new repo name, but from past experience, this can be expected. If there are any edge cases with forks that need to be explored, please share. As expected, the initial tests showed the origins updating and the upstream still intact.
Overview
Closes part of #3855
Closes #8590 (verify that this is true before merging)
Description
The steps to reproduce this bug are found at #3855 (comment).
The tl;dr is – if you rename a repository on github.com the remote url isn’t updated in the .gitconfig. This isn’t a problem until you create new repo that has the original name and the remote urls are in conflict.
My attempt to fix this involves detecting when the repository is renamed (in
AppStore.repositoryWithRefreshedGitHubRepository) and updating the remote url in.gitconfig(viagitStore.setRemoteURL).Special notes
sshwe don’t update the remote url. I did this based on what Markus said in Update the remote url if it changed. #8132 (comment). The assumption being, if the user has specified a protocol other than Desktop’s default protocol then we should trust that they know what the remote url should be.gitStore.defaultRemote.urlis the different thanrepository.gitHubRepository.cloneURLwe don’t update the remote url. Like above, this means the user has manually changed the remote url at some point so we trust that they know what the url should be and how to updated it.gitStore.loadRemotes()after the remote is set. But I tried to verify that this was a problem in my tests and couldn’t.Release notes
cc @kuychaco