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
{{ message }}
Repository navigation
FetchInfo.commit breaks if you fetch a ref to a location outside of refs/remotes/ #25
Example with a refspec of refs/remotes/origin/tags/*:refs/tags/*:
File "/home/kergoth/.local/lib/python2.6/site-packages/git/remote.py", line 183, in commit
return self.ref.commit
File "/home/kergoth/.local/lib/python2.6/site-packages/git/refs/symbolic.py", line 165, in _get_commit
obj = self._get_object()
File "/home/kergoth/.local/lib/python2.6/site-packages/git/refs/symbolic.py", line 158, in _get_object
return Object.new_from_sha(self.repo, hex_to_bin(self.dereference_recursive(self.repo, self.path)))
File "/home/kergoth/.local/lib/python2.6/site-packages/git/refs/symbolic.py", line 112, in dereference_recursive
hexsha, ref_path = cls._get_ref_info(repo, ref_path)
File "/home/kergoth/.local/lib/python2.6/site-packages/git/refs/symbolic.py", line 139, in _get_ref_info
raise ValueError("Reference at %r does not exist" % ref_path)
ValueError: Reference at 'refs/remotes/1.0' does not exist
In this case, I fetched a tag with a refspec rather than the ordinary tag fetching, but as you can see from the error, the code looks like it assumes that any fetched ref has to live in refs/remotes, which isn't the case. I suspect this would also occur fetching an ordinary branch to a path outside of refs/remotes/, but I haven't yet tested that case.
Activity
Fetch info can now deal much better with non-default ref specs, fixes #…
Byron commentedon Jul 4, 2011
Please have a look at all your issues and let me know whether they are fixed with the latest 0.3 branch.
Fetch info can now deal much better with non-default ref specs, see #23…
kergoth commentedon Jul 15, 2011
This particular bug appears to be fixed.