Skip to content

Commit

Permalink
Make blame accept absolute paths
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Robin Rosenberg authored and Junio C Hamano committed Feb 5, 2008
1 parent d089eba commit 097971f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions builtin-blame.c
Original file line number Diff line number Diff line change
Expand Up @@ -1894,9 +1894,7 @@ static unsigned parse_score(const char *arg)

static const char *add_prefix(const char *prefix, const char *path)
{
if (!prefix || !prefix[0])
return path;
return prefix_path(prefix, strlen(prefix), path);
return prefix_path(prefix, prefix ? strlen(prefix) : 0, path);
}

/*
Expand Down

0 comments on commit 097971f

Please sign in to comment.