Skip to content

My git fetch command is broken after updating from 3.1.20 to 3.1.30 #1540

Answered by gpxricky
gpxricky asked this question in Q&A
Discussion options

You must be logged in to vote

@Byron Many thanks. I think it is clear now for me how to use the "new" fetch function. Unfortunately, I don't know which options are provided to my function as they are read from an input file and I can't change the input file due to compatibility issues and other problems. Therefore my function still looks as follows:

def fetch_tag(remote, tag, fetch_options):
    remote.fetch(?)

In the past I was using the fetch method of a Remote, but I think I need to change that to use git directly:

def fetch_tag(remote, tag, fetch_options):
    remote.repo.git.fetch(["-v", remote.name, "tag", tag] + fetch_options)

This is more or less fine for me, although using the official method feels somehow …

Replies: 3 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@Byron
Comment options

Comment options

You must be logged in to vote
1 reply
@Byron
Comment options

Answer selected by gpxricky
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #1538 on January 14, 2023 07:28.