Subject: Re: [PATCH v5 4/5] setup: Add 'abspath_part_inside_repo' function

From: Martin Erik Werner <[email-masked]>
Date: Tue, 04 Feb 2014 19:32:47 +0100

On Tue, 2014-02-04 at 10:09 -0800, Junio C Hamano wrote:
> Martin Erik Werner <[email-masked]> writes:
(...)
> > I was trying to convey that if path is simply "/dir/repo", then the while
> > loop method of replacing a '/' and checking from the beginning won't
> > work for the last level, since it has no terminating '/' to replace, so
> > hence it's a special case, mentioning the "part inside the work tree"
> > is arguably confusing in that case, since there isn't really one, maybe
> > it should be left out completely, since the "check each level"
> > explanation covers it already?
> 
> I dunno about the explanation, but it still looks strange to have
> the special case to deal with "/dir/repo" before you enter the while
> loop, and then also have code immediately after the loop that seems
> to handle the same case.  Isn't the latter one redundant?

The check before the loop doesn't use 'real_path', the one after does:
"/dir/repo" vs "/dir/repolink"

-- 
Martin Erik Werner <[email-masked]>