diff options
author | Catalin Marinas <catalin.marinas@gmail.com> | 2010-10-22 16:44:12 +0100 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@gmail.com> | 2010-10-22 16:44:12 +0100 |
commit | 32a4e200ade6693f98cab1118d9088d4049a65c3 (patch) | |
tree | cfb8eb9b5c720eabf2ba86ebe1aaf505bbc773f7 | |
parent | f0b6dda7e20f9ea0d6cf9719bcea3cbc12281a2d (diff) | |
download | stgit-32a4e200ade6693f98cab1118d9088d4049a65c3.tar.gz |
get_merge_bases() should return a list rather than set
This is for cases where we need to use one of the elements of the list.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
-rw-r--r-- | stgit/commands/publish.py | 2 | ||||
-rw-r--r-- | stgit/lib/git.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/stgit/commands/publish.py b/stgit/commands/publish.py index 3aa83a2..6bd1c94 100644 --- a/stgit/commands/publish.py +++ b/stgit/commands/publish.py @@ -155,7 +155,7 @@ def func(parser, options, args): # 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') diff --git a/stgit/lib/git.py b/stgit/lib/git.py index d60e1d2..3378728 100644 --- a/stgit/lib/git.py +++ b/stgit/lib/git.py @@ -653,7 +653,7 @@ class Repository(RunWithEnv): """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] |