Skip to content

Commit 2a86d18

Browse files
datengrabenjrfnl
authored andcommitted
Reports/GitBlame: Fix invocation path of git blame
After we change into the files directory, invocation of git blame with full path will end in fatal error.
1 parent fbd03b9 commit 2a86d18

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Reports/Gitblame.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ protected function getBlameContent($filename)
7070
$cwd = getcwd();
7171

7272
chdir(dirname($filename));
73-
$command = 'git blame --date=short "'.$filename.'" 2>&1';
73+
$command = 'git blame --date=short "'.basename($filename).'" 2>&1';
7474
$handle = popen($command, 'r');
7575
if ($handle === false) {
7676
$error = 'ERROR: Could not execute "'.$command.'"'.PHP_EOL.PHP_EOL;

0 commit comments

Comments
 (0)