-
-
Notifications
You must be signed in to change notification settings - Fork 962
Closed
Description
I am attempting to use GitPython to remove a tag from a local clone which does not exist in the remote repo. After fetching a remote, remote.stale_refs shows the following stale tag: <git.RemoteReference "refs/remotes/refs/tags/new_tag">. This already seems to be a problem, as the path to the tag should be refs/tags/new_tag. When I run ref.delete(repo, ref) (where ref is the git.RemoteReference and repo is its corresponding git.Repo instance), I get the following exception:
GitCommandError: 'git branch -d -r refs/tags/new_tag' returned exit status 1: error: remote branch 'refs/tags/new_tag' not found.
Additionally, ref.name is set to refs/tags/new_tag, so at least that much looks correct.
My GitPython version is 0.3.2.1. I have not yet had a chance to test with a newer version.