diff options
author | Guido Günther <agx@sigxcpu.org> | 2018-08-17 15:37:44 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2018-08-17 15:45:48 +0200 |
commit | ddc4393a64f3662e0214ea180c7ec6f5a2ae3794 (patch) | |
tree | 2a33e907acd14f87f34d6fc325276f081b1a8427 /gbp/git | |
parent | 5fedb2baf1b03c3c128898de545984c1622bac79 (diff) |
GitRepository.grep_log: Switch to GitArgs
Gbp-Dch: Ignore
Diffstat (limited to 'gbp/git')
-rw-r--r-- | gbp/git/repository.py | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 827bf17b..6cc3cd9f 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -1654,15 +1654,13 @@ class GitRepository(object): @param since: where to start grepping (e.g. a branch) @type since: C{str} """ - args = ['--pretty=format:%H'] - if not merges: - args.append("--no-merges") - args.append("--grep=%s" % regex) - if since: - args.append(since) - args.append('--') + args = GitArgs('--pretty=format:%H') + args.add_false(merges, '--no-merges') + args.add('--grep=%s' % regex) + args.add_true(since, since) + args.add('--') - stdout, stderr, ret = self._git_inout('log', args, + stdout, stderr, ret = self._git_inout('log', args.args, capture_stderr=True) if ret: raise GitRepositoryError("Error grepping log for %s: %s" % |