Subject: Re: [RFC PATCH] Fix gitdir detection when in subdir of gitdir

From: Junio C Hamano <[email-masked]>
Date: Fri, 16 Jan 2009 10:07:03 -0800

Johannes Sixt <[email-masked]> writes:

> Johannes Sixt schrieb:
>> Gábor's patch needs a better justification which misbehavior it tries to
>> fix, and the spot that it changes:
>
> I actually meant: "which use-case the patch tries to help". Because the
> current behavior can hardly be classified as bug. ("You have no business
> cd-ing around in .git." ;)

Thanks.

I think (1) the solution (almost) makes sense, (2) the patch needs to be
explained a lot better as you mentioned in your two messages, and (3) if
it does not affect any other case than when you are in a subdirectory of
the .git/ directory, then you are doing something funny anyway and
performance issue Dscho mentions, if any, is not a concern.

My "(almost)" in (1) above is because the patch uses this new behaviour
even when you are inside the .git/ directory itself (or at the root of a
bare repository), which is a very common case that we do not have to nor
want to change the behaviour.  It also invalidates the precondition of (3)
above.

Dscho, what performance issues do you have in mind, by the way?