Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refs break after renaming repositories #15720

Open
Retr0-01 opened this issue Dec 4, 2022 · 1 comment
Open

Refs break after renaming repositories #15720

Retr0-01 opened this issue Dec 4, 2022 · 1 comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs

Comments

@Retr0-01
Copy link

Retr0-01 commented Dec 4, 2022

The problem

We have two repositories, let's call them Project which is an old repository and cuddly-invention (one of the random names github generates) which is newly created. On repository Project we have an open pull request. We then rename the repositories from Project to Project-Legacy and cuddly-invention to Project, clone the new Project repository (which again is the newly created one), close the pull request in Project-Legacy (which was the original Project repo).

This will make the Pull Requests list in the Project repository still show the closed PR from the legacy repository and a Couldn't find branch in remote error if you try to checkout to it along with a 404 and a 422 error code in console.

Release version

Version 3.1.2 (x64)

Operating system

Windows 11

Steps to reproduce the behavior

No response

Log files

No response

Screenshots

image

Additional context

No response

@niik
Copy link
Member

niik commented Dec 13, 2022

Hey @Retr0-01, thanks for reaching out. This behavior is unfortunate but not unexpected given how we associate local repositories with remotes by name only which means we currently don't have a system in place for detecting the scenario you outline above. We do have the repository database id in stored locally which we could use to detect when a repository name and id no longer matches up and use that information to clean our local database. This work is nontrivial and comes with its own set of risks as we currently don't have a good reference counting system in place for our local database. I'm going to tag this as a bug for us to consider as we're making other changes to the local database going forward. Thanks!

@niik niik added the bug Confirmed bugs or reports that are very likely to be bugs label Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs
Projects
None yet
Development

No branches or pull requests

2 participants