Skip to content

Brokenness fetching from a github repo which has merged a pull request #28

Closed
@kergoth

Description

@kergoth

Try fetching from, for example, git://github.com/kergoth/oe-core-template. The reason it blows up is as far as I can tell, the remote end has a ref (not a tag) which is outside of refs/heads/ and refs/tags/ (it's refs/pull/1/head and refs/pull/1/merge). When it fetches these remotes, the fetch_line has no ref type specified at all:

9e30b7d61417455edbbc4617eb9eef9341255bb5 not-for-merge 'refs/pull/1/merge' of git://github.com/kergoth/oe-core-template

And results in, as you'd expect:

File "/home/kergoth/.local/lib/python2.7/site-packages/GitPython-0.3.1-py2.7.egg/git/db/cmd/base.py", line 119, in
for err_line,fetch_line in zip(fetch_info_lines, fetch_head_info))
File "/home/kergoth/.local/lib/python2.7/site-packages/GitPython-0.3.1-py2.7.egg/git/db/cmd/base.py", line 442, in _from_line
raise TypeError("Cannot handle reference type: %r" % ref_type_name)
TypeError: Cannot handle reference type: "'refs/pull/1/head'"

Activity

georgengel

georgengel commented on Feb 28, 2013

@georgengel

same problem with gitorious merge-requests:
Fetching from the remote
Cannot handle reference type: "'refs/merge-requests/1'"

jantman

jantman commented on Apr 26, 2014

@jantman

This is a serious problem for me as well... this has been open for a year, with no comment. Is there any update on this? Any hopes of getting it fixed?

jantman

jantman commented on Jul 16, 2014

@jantman

I see that there's a lot of activity on GitPython lately, any chance of getting this fixed? This is a real blocker for using GitPython to interact with GitHub forks...

Byron

Byron commented on Jul 17, 2014

@Byron
Member

I am trying to get back into the project, and seem to be doing this in baby-steps.
It's a bit like writers block - technically I can do it, but my head really wants to make me believe I should do other things first.
However, I should be fast in merging pull requests in case someone else wants to step up.

added this to the v0.3.5 - bugfixes milestone on Nov 19, 2014
Byron

Byron commented on Nov 19, 2014

@Byron
Member

FETCH_INFO parsing has been greatly improved in the latest version on pypi, which makes me believe this issue could be fixed.
However, when working on 0.3.5, I shall verify it.

jantman

jantman commented on Jan 2, 2015

@jantman

@Byron thanks so much. I can confirm that 0.3.2.1 fixes the probelm when fetching GitHub remotes with pull refs (i.e. fetch = +refs/pull/*/head:refs/pull/origin/*)

Byron

Byron commented on Jan 2, 2015

@Byron
Member

Thanks for verifying this ! I am gladly closing this issue !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @kergoth@Byron@jantman@georgengel

        Issue actions

          Brokenness fetching from a github repo which has merged a pull request · Issue #28 · gitpython-developers/GitPython