Make blame accept absolute paths
authorRobin Rosenberg <robin.rosenberg.lists@dewire.com>
Fri, 1 Feb 2008 04:07:04 +0000 (05:07 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 5 Feb 2008 08:44:10 +0000 (00:44 -0800)
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>
builtin-blame.c

index 9b4c02e87f7ef4a20d269ab9315b6977cf7fb3fb..dea640d17bc0ecd4378e51bc92a32cb8c8803735 100644 (file)
@@ -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);
 }
 
 /*