Re: Fix per-directory exclude handing for "git add"
From: Bruce Stephens <hidden>
Date: 2016-06-15 22:43:52
Junio C Hamano [off-list ref] 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 [off-list ref], 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. [...]