MCPcopy
hub / github.com/jisaacks/GitGutter / git_blame

Method git_blame

modules/handler.py:693–709  ·  view source on GitHub ↗

Call git blame to find out who changed a specific line of code

(self, row)

Source from the content-addressed store, hash-verified

691 self._git_binary, 'rev-parse', compare_against])
692
693 def git_blame(self, row):
694 """Call git blame to find out who changed a specific line of code"""
695 if self.settings.get('line_annotation_ignore_whitespace'):
696 ignore_ws = ['-w']
697 else:
698 ignore_ws = []
699
700 return self.execute_async([
701 self._git_binary,
702 '-c', 'core.autocrlf=input',
703 '-c', 'core.eol=lf',
704 '-c', 'core.safecrlf=false',
705 'blame', '-p', '-L%d,%d' % (row + 1, row + 1)
706 ] + ignore_ws + [
707 '--contents', self.translate_path_to_wsl(self.view_cache.name),
708 '--', self._git_path
709 ])
710
711 def git_read_file(self, commit):
712 """Read the content of the file from specific commit.

Callers 1

run_blameFunction · 0.80

Calls 3

execute_asyncMethod · 0.95
translate_path_to_wslMethod · 0.95
getMethod · 0.80

Tested by

no test coverage detected