Re: 1.8.3 - gitignore not being parsed correctly on OS X; regex support is broken?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 29.05.2013 06:19, schrieb Duy Nguyen:
> On Wed, May 29, 2013 at 10:41 AM, Duy Nguyen <pclouds@xxxxxxxxx> wrote:
>> The changes in this area since 1.8.2.3 seem to be Karsten's (I'm not
>> blaming, just wanted to narrow down the problem). The patterns of
>> interest seem to be
>>
>> !/bin
>> /bin/*
>> !/bin/brew
>>
>> Without "!/bin" v1.8.3 seems to behave the same as v1.8.2.3.
> 
> Karsten, the block "/* Abort if the directory is excluded */" in
> prep_exclude() seems to cause this. I think it goes through the
> exclude patterns, hits "!/bin", believes the patterns do not make
> sense in this context and throws all away.

Yes, I forgot to check the "!" flag to determine if the directory is really excluded. I'll prepare a patch + test case for this.

@Øystein: in the meantime, could you check if this fixes the problem for you?

--- 8< ---
diff --git a/dir.c b/dir.c
index a5926fb..13858fe 100644
--- a/dir.c
+++ b/dir.c
@@ -821,6 +821,9 @@ static void prep_exclude(struct dir_struct *dir, const char *base, int baselen)
 				dir->basebuf, stk->baselen - 1,
 				dir->basebuf + current, &dt);
 			dir->basebuf[stk->baselen - 1] = '/';
+			if (dir->exclude &&
+			    dir->exclude->flags & EXC_FLAG_NEGATIVE)
+				dir->exclude = NULL;
 			if (dir->exclude) {
 				dir->basebuf[stk->baselen] = 0;
 				dir->exclude_stack = stk;
-- 

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]