You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Something I've come across a few times trying to deal with automating multiple repositories is that the only way to fetch is with a defined remote. I want to be able to do the equivalent of git fetch git://repo.url/path/repo.git branch/name and have it return a FetchInfo I can use. Currently i'm working around this by creating a new remote, fetching from it and deleting it at the end of the operation.
Thanks.
The text was updated successfully, but these errors were encountered:
From this ticket I can only assume what you would like to see. If you flesh it out to become a feature request, chances are that someone will pick it up and implements some additional API to make that easier.
In the meanwhile, a valid workaround would be to call git directly:
So i don't really mind what the API is, I was hoping to request the feature and then leave it up to the developers. I think the most likely is the same/similar interface (and probably code) as remote.fetch but directly on the repo. ie:
r = git.Repo('path/to/clone')`
fetch_info = r.fetch('git://repo.url/path/repo.git', 'branch/name')
print fetch_info.ref
You're right, I can use r.git.fetch and i guess FETCH_HEAD is then valid there but i thought i'd put it up as a feature request as it's something i've come across more than once now.
Something I've come across a few times trying to deal with automating multiple repositories is that the only way to fetch is with a defined remote. I want to be able to do the equivalent of
git fetch git://repo.url/path/repo.git branch/name
and have it return a FetchInfo I can use. Currently i'm working around this by creating a new remote, fetching from it and deleting it at the end of the operation.Thanks.
The text was updated successfully, but these errors were encountered: