Skip to content

Attempting to remove tag results in exception #260

@terminalmage

Description

@terminalmage

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    pFad - Phonifier reborn

    Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

    Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


    Alternative Proxies:

    Alternative Proxy

    pFad Proxy

    pFad v3 Proxy

    pFad v4 Proxy