Skip to content

Commit 097971f

Browse files
Robin Rosenberggitster
authored andcommitted
Make blame accept absolute paths
Blame did not always use prefix_path. Signed-off-by: Robin Rosenberg <robin.rosenberg@dewire.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent d089eba commit 097971f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

builtin-blame.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1894,9 +1894,7 @@ static unsigned parse_score(const char *arg)
18941894

18951895
static const char *add_prefix(const char *prefix, const char *path)
18961896
{
1897-
if (!prefix || !prefix[0])
1898-
return path;
1899-
return prefix_path(prefix, strlen(prefix), path);
1897+
return prefix_path(prefix, prefix ? strlen(prefix) : 0, path);
19001898
}
19011899

19021900
/*

0 commit comments

Comments
 (0)