diff options
author | Guido Günther <agx@sigxcpu.org> | 2012-01-10 20:28:04 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2012-01-10 20:30:46 +0100 |
commit | b956ebfc138422aecb0e0dec0a603c3b8316a12e (patch) | |
tree | 34bd66c71078bc96402a21e5a85c1b1b8e6d1516 | |
parent | 3d4adca7af78280b66750412633774a478e20465 (diff) |
GitRepository.branch_contains: fix misplaced remote parameter
-rw-r--r-- | gbp/git/repository.py | 3 | ||||
-rw-r--r-- | tests/test_GitRepository.py | 2 |
2 files changed, 4 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 640cc88a..fe405884 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -381,8 +381,9 @@ class GitRepository(object): @param remote: whether to check remote instead of local branches @type remote: C{bool} """ - args = GitArgs('--contains') + args = GitArgs() args.add_true(remote, '-r') + args.add('--contains') args.add(commit) out, ret = self.__git_getoutput('branch', args.args) diff --git a/tests/test_GitRepository.py b/tests/test_GitRepository.py index 50b733db..7eaae1e3 100644 --- a/tests/test_GitRepository.py +++ b/tests/test_GitRepository.py @@ -117,6 +117,8 @@ def test_create_branch(): >>> repo.create_branch("foo") >>> repo.branch_contains("foo", 'HEAD') True + >>> repo.branch_contains("doesnotexist", 'HEAD', remote=True) + False """ def test_delete_branch(): |