diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-07-30 11:35:08 +0200 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-07-30 14:40:36 +0200 |
commit | aae9b921686054070c6897fd64cb80af90cf92d2 (patch) | |
tree | 4123f3ed355d8d3cd735b3800ec2dca7d0abeeab | |
parent | 1804b1f64d33291f1b6832384d56a7ed16fa47e6 (diff) |
gbp.git.GitRepository: Add first_parent option to commits()
Git-Dch: Ignore
-rw-r--r-- | gbp/git.py | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -266,14 +266,23 @@ class GitRepository(object): else: return [] - def commits(self, since=None, until=None, paths=None, options=None): - """get commits from start to end touching paths""" + def commits(self, since=None, until=None, paths=None, options=None, + first_parent=False): + """ + get commits from since to until touching paths + + @param options: list of options past to git log + @type options: list of strings + """ args = ['--pretty=format:%H'] if options: args += options + if first_parent: + args += [ "--first-parent" ] + if since and until: args += ['%s..%s' % (since, until)] |