Subject: Re: Fix per-directory exclude handing for "git add"

From: Bruce Stephens <[email-masked]>
Date: Fri, 16 Nov 2007 13:50:29 +0000

Junio C Hamano <[email-masked]> writes:

[...]

> While read_directory_recursive() runs, calls to excluded() makes use
> the data in the exclusion elements, including this base string.  The
> caller of read_directory_recursive() is not supposed to free the
> buffer it gave to push_exclude_per_directory() earlier, until it
> returns.

Cool, that fixes the "git add" issue I was seeing.  (So Acked-by:
Bruce Stephens <[email-masked]>, for what it's worth.)

I guess really the output of "git status" (or "git runstatus") is more
significant since that's what we'd normally be running (that's
presumably what "git gui" and similar tools run, though perhaps they
use "git ls-files"---probably the underlying code's the same, I
guess).

However, that doesn't mean the issue with git add shouldn't be
resolved.

[...]