From: Robin Rosenberg <robin.rosenberg.lists@dewire.com>
Date: Fri, 1 Feb 2008 04:07:04 +0000 (+0100)
Subject: Make blame accept absolute paths
X-Git-Tag: v1.5.5-rc0~184^2~2
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=097971f5f564dbd832eea774ae0cdcfa03ba35ac;p=git

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>
---

diff --git a/builtin-blame.c b/builtin-blame.c
index 9b4c02e87f..dea640d17b 100644
--- a/builtin-blame.c
+++ b/builtin-blame.c
@@ -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);
 }
 
 /*