diff options
author | Iain Lane <laney@debian.org> | 2018-08-17 11:22:01 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2018-08-17 15:35:12 +0200 |
commit | 5fedb2baf1b03c3c128898de545984c1622bac79 (patch) | |
tree | 382d792af3d109a725d7c198941abe771d31a889 /gbp/git | |
parent | 8b266be2def8ec346d8f91ef54e2f4fa8edd9532 (diff) |
Ignore merge commits when looking at the pristine-tar branch
When there is a merge commit in this branch, we currently get the
warning:
gbp:warning: Unknown compression type of Merge branch 'pristine-tar' into 'pristine-tar', assuming gzip
because we're grepping the commit logs to find out the compression type
of the tarballs in there.
For now, we can just use `git log ... --no-merges' to not see these
commits.
Signed-off-by: Guido Günther <agx@sigxcpu.org>
Closes: #906331
Diffstat (limited to 'gbp/git')
-rw-r--r-- | gbp/git/repository.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index 1fc92ee9..827bf17b 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -1645,7 +1645,7 @@ class GitRepository(object): raise GitRepositoryError("can't get %s: %s" % (id, stderr.decode().rstrip())) return obj - def grep_log(self, regex, since=None): + def grep_log(self, regex, since=None, merges=True): """ Get commmits matching I{regex} @@ -1655,6 +1655,8 @@ class GitRepository(object): @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) |