Mercurial > hg > hg-git
changeset 716:268b9f6ed1c8
filter_refs: only return all refs when heads is None
We're going to pass in an empty list to this function in an upcoming patch,
with the intent that filter_refs returns an empty dict.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Thu, 08 May 2014 19:30:38 -0700 |
parents | 5770a5a8bc00 |
children | 467b0603cc9c |
files | hggit/git_handler.py |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -1032,12 +1032,12 @@ ## REFERENCES HANDLING def filter_refs(self, refs, heads): - '''For a dictionary of refs: shas, if heads has any elements then return refs + '''For a dictionary of refs: shas, if heads is None then return refs that match the heads. Otherwise, return refs that are heads or tags. ''' filteredrefs = {} - if heads: + if heads is not None: # contains pairs of ('refs/(heads|tags|...)/foo', 'foo') # if ref is just '<foo>', then we get ('foo', 'foo') stripped_refs = [