From f533a68cb5295f912da05e061a0b9bca05b3f0c8 Mon Sep 17 00:00:00 2001 From: Vincent Driessen Date: Wed, 13 Apr 2016 16:02:05 +0200 Subject: Allow passing args to git-blame This can be used to pass options like -C or -M. --- git/repo/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git') diff --git a/git/repo/base.py b/git/repo/base.py index 64374f80..9d013230 100644 --- a/git/repo/base.py +++ b/git/repo/base.py @@ -714,7 +714,7 @@ class Repo(object): yield commits[hexsha], range(lineno, lineno + num_lines) - def blame(self, rev, file, incremental=False): + def blame(self, rev, file, incremental=False, **kwargs): """The blame information for the given file at the given revision. :parm rev: revision specifier, see git-rev-parse for viable options. @@ -724,9 +724,9 @@ class Repo(object): changed within the given commit. The Commit objects will be given in order of appearance.""" if incremental: - return self.blame_incremental(rev, file) + return self.blame_incremental(rev, file, **kwargs) - data = self.git.blame(rev, '--', file, p=True, stdout_as_string=False) + data = self.git.blame(rev, '--', file, p=True, stdout_as_string=False, **kwargs) commits = dict() blames = list() info = None -- cgit v1.2.3