Skip to content

Commit e001e44

Browse files
author
z
authored
fix not working in windows because path (#30)
1 parent 7357ee1 commit e001e44

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
@@ -117,7 +117,7 @@ def __init__(self, view):
117117
def get_blame(self, line, path):
118118
try:
119119
return shell(
120-
["git", "blame", "--minimal", "-w", "-L {0},{0}".format(line), path],
120+
["git", "blame", "--minimal", "-w", "-L {0},{0}".format(line), os.path.basename(path)],
121121
cwd=os.path.dirname(os.path.realpath(path)),
122122
startupinfo=si,
123123
stderr=subprocess.STDOUT
@@ -268,7 +268,7 @@ def get_blame_lines(self, path):
268268
'''
269269
try:
270270
# The option --show-name is necessary to force file name display.
271-
command = ["git", "blame", "--show-name", "--minimal", "-w", path]
271+
command = ["git", "blame", "--show-name", "--minimal", "-w", os.path.basename(path)]
272272
output = shell(
273273
command,
274274
cwd=os.path.dirname(os.path.realpath(path)),

0 commit comments

Comments
 (0)