Re: [PROPOSAL] .gitignore syntax modification

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

 



On Oct 12, 2010, at 7:40 PM, Jonathan Nieder wrote:

> Kevin Ballard wrote:
>> On Oct 12, 2010, at 7:24 PM, Nguyen Thai Ngoc Duy wrote:
> 
>>> Special case "**/" (also "path/to/**/") is probably good enough. You
>>> might need to handle all combinations of "**/" and other optimizations
>>> in excluded_from_list() though. Can you make a patch (or a few
>>> patches) for it?
> [...]
>>                                                                 At
>> this point I'm actually in favor of simply assuming all paths that
>> don't start with / can be matched at any level
> 
> As a long-term change with early warnings and proper deprecation
> procedure that may (or may not) be an ok idea, but in the short
> term it is certainly a no-go.
> 
> If linux-2.6 is any indication of what to expect, some projects are
> not using / in front of any paths with / at all.

Another possibility is using this new behavior for core.excludesfile and possibly .git/info/exclude, but not for patterns in .gitignore files. The benefit here is any existing project that uses .gitignore files will be unchanged, but global (and possibly repo-wide) patterns can benefit from the new behavior. The drawback is this would introduce a behavioral difference for patterns depending on which file they're in, which is probably not acceptable.

I will look into how much work is required to support **/ patterns without doing a wholesale replacement of fnmatch(). Hopefully it won't be infeasible.

-Kevin Ballard--
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]