# check for rebased stack. In this case we emulate a merge with the stack
# base by setting two parents.
- merge_bases = repository.get_merge_bases(public_head, stack.base)
+ merge_bases = set(repository.get_merge_bases(public_head, stack.base))
if public_head in merge_bases:
# fast-forward the public ref
repository.refs.set(public_ref, stack.head, 'publish')
"""Return a set of merge bases of two commits."""
sha1_list = self.run(['git', 'merge-base', '--all',
commit1.sha1, commit2.sha1]).output_lines()
- return set(self.get_commit(sha1) for sha1 in sha1_list)
+ return [self.get_commit(sha1) for sha1 in sha1_list]
def describe(self, commit):
"""Use git describe --all on the given commit."""
return self.run(['git', 'describe', '--all', commit.sha1]