Mercurial > hg > hg-git
changeset 1008:2cd253b6c8ab
git2hg: protect incoming from looking up HEAD
It doesn't really make sense to look up HEAD since this is checking 'incoming'.
author | Sean Farley <sean@farley.io> |
---|---|
date | Fri, 15 May 2015 12:57:52 -0700 |
parents | 9b7088850ca8 |
children | 4fa1812d1f24 |
files | hggit/git2hg.py |
diffstat | 1 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/git2hg.py +++ b/hggit/git2hg.py @@ -22,10 +22,10 @@ def get_heads(refs): todo = [] seenheads = set() - for sha in refs.itervalues(): + for ref, sha in refs.iteritems(): # refs could contain refs on the server that we haven't pulled down - # the objects for - if sha in git_object_store: + # the objects for; also make sure it's a sha and not a symref + if ref != 'HEAD' and sha in git_object_store: obj = git_object_store[sha] while isinstance(obj, Tag): obj_type, sha = obj.object