diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-12-29 12:33:13 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-12-29 12:46:17 +0100 |
commit | 479b933c55228cba29bae9cfa50930bb1ff32f00 (patch) | |
tree | 6c5eef35b82071865be4bb781021169606e284e8 /gbp/git | |
parent | 77846d4e09e8b2f5f977e51bb753f6f7968b38b2 (diff) |
GitRepository: Add testcases for cornercases
and small functions
Git-Dch: Ignore
Diffstat (limited to 'gbp/git')
-rw-r--r-- | gbp/git/repository.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/gbp/git/repository.py b/gbp/git/repository.py index e834e94b..fa2e9fc6 100644 --- a/gbp/git/repository.py +++ b/gbp/git/repository.py @@ -916,11 +916,19 @@ class GitRepository(object): for line in commit: yield line - def grep_log(self, regex, where=None): + def grep_log(self, regex, since=None): + """ + Get commmits matching I{regex} + + @param regex: regular expression + @type regex: C{str} + @param since: where to start grepping (e.g. a branch) + @type since: C{str} + """ args = ['--pretty=format:%H'] args.append("--grep=%s" % regex) - if where: - args.append(where) + if since: + args.append(since) args.append('--') commits, ret = self.__git_getoutput('log', args) |