Skip to content

Commit bf4fda4

Browse files
authored
Merge pull request #34 from kltk/patch-1
fix not working in windows because path (#30)
2 parents dadeb95 + 4eb4304 commit bf4fda4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

git-blame.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def __init__(self, view):
115115
@functools.lru_cache(128, False)
116116
def get_blame(self, line, path):
117117
return subprocess.check_output(
118-
["git", "blame", "--minimal", "-w", "-L {0},{0}".format(line), path],
118+
["git", "blame", "--minimal", "-w", "-L {0},{0}".format(line), os.path.basename(path)],
119119
cwd=os.path.dirname(os.path.realpath(path)),
120120
startupinfo=si,
121121
stderr=subprocess.STDOUT
@@ -265,7 +265,7 @@ def run(self, edit):
265265
def get_blame(self, path):
266266
return subprocess.check_output(
267267
# The option --show-name is necessary to force file name display.
268-
["git", "blame", "--show-name", "--minimal", "-w", path],
268+
["git", "blame", "--show-name", "--minimal", "-w", os.path.basename(path)],
269269
cwd=os.path.dirname(os.path.realpath(path)),
270270
startupinfo=si,
271271
stderr=subprocess.STDOUT

0 commit comments

Comments
 (0)