Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upEnsure only fully matching symrefs are deleted #1038
Conversation
Deleting a symbolic ref with e.g. the name 'refs/remotes/origin/mas' would also delete 'refs/remotes/origin/master' if the ref had to be deleted from the pack file. In order to fix this the full ref is now checked for a match.
0803ee4
to
027fd13
Any pointers on how to test this would be appreciated. The problem is that I need a repo with the remote still in the pack file to exercise the changed code path. |
My apologies for the late reply, I do try to prioritize PRs and mistook it as an issue. That said, the tests seems to succeed despite the changes, which might mean that the behaviour described here is not actually intended. Please let me know if you have any issues or lack the time to dive into it, as my disposition here is to merge anyway. |
I don't know a way to create a git repo that has the remote still in the pack file, as that would be needed to reproduce the issue. We are using a patched version of GitPython for some time now and don't see the described behavior anymore. In case you also don't know a way to setup a git repo with the remote in the pack file I'd be glad if you could merge it as is. |
Sometimes a little nudge is all it takes - let's merge and hope for the best. |
Deleting a symbolic ref with e.g. the name 'refs/remotes/origin/mas'
would also delete 'refs/remotes/origin/master' if the ref had to be
deleted from the pack file.
In order to fix this the full ref is now checked for a match.