Re: bug: sparse config interpretation incorrectness in 2.8.0-rc2
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 17, 2016, 00:56 UTC
- Message-ID
- <20160317005632.GA17778@duynguyen-vnpc.dek-tpc.internal>
- In-Reply-To
- <56E9F5B3.6030903@fb.com>
On Wed, Mar 16, 2016 at 05:09:23PM -0700, Durham Goode wrote:
Show 17 quoted lines
> Using git 2.8.0-rc2, given a repo with the following files: > > - one/hideme > - one/donthide > - two/foo > > A sparse config of: > > cat > .git/info/sparse-checkout <<EOF > /* > !one/hideme > EOF > > Results in a repository that only has `one/donthide` in it. I would > expect `two/foo`to be present as well. This worked in 2.6, and > bisecting it points to d589a67eceacd1cc171bbe94906ca7c9a0edd8c5 > "dir.c: don't exclude whole dir prematurely" (author cc'd).
Thank you. This should fix it. I think I understand why it goes wrong. I'm going to run some more tests and post a proper patch later.
-- 8< --
diff --git a/dir.c b/dir.c index 69e0be6..77f38a5 100644 --- a/dir.c +++ b/dir.c @@ -1027,7 +1027,6 @@ static struct exclude *last_exclude_matching_from_list(const char *pathname, exc = x; break; } - continue; } if (x->flags & EXC_FLAG_MUSTBEDIR) { -- 8< -- -- Duy