From: Robin Rosenberg Date: Fri, 01 Feb 2008 04:07:04 GMT Subject: [PATCH] Make blame accept absolute paths Message-ID: <200802010507.05421.robin.rosenberg.lists@dewire.com> In-Reply-To: <7vve5dox0o.fsf_-_@gitster.siamese.dyndns.org> Blame did not always use prefix_path. Signed-off-by: Robin Rosenberg --- builtin-blame.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) This is a followup to "setup: sanitize absolute and funny paths in get_pathspec()" Thanks Junio for fixing this wish of mine. diff --git a/builtin-blame.c b/builtin-blame.c index c7e6887..f88c32a 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); } /* -- 1.5.4.rc4.25.g81cc