Re: Change in .gitignore handling: intended or bug?

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

 



Duy Nguyen <pclouds@xxxxxxxxx> writes:

> On Wed, Mar 9, 2016 at 1:10 AM, Junio C Hamano <gitster@xxxxxxxxx> wrote:
>> diff --git a/Documentation/gitignore.txt b/Documentation/gitignore.txt
>> index 3ded6fd..91d1ce2 100644
>> --- a/Documentation/gitignore.txt
>> +++ b/Documentation/gitignore.txt
>> @@ -148,7 +148,43 @@ excluded, the following conditions must be met:
>>     be in the same .gitignore file.
>>
>>   - The directory part in the re-include rules must be literal (i.e. no
>> -   wildcards)
>> +   wildcards and has to start with a `/`).
>
> Technically '/' can just appear anywhere in the pattern, except at the
> end. But because the patterns in question must look like this
>
>     dir # or any pattern, even "*"
>     !dir/someth*ng
>
> even if there is a slash at the end (and is ignored), we are still
> good. Not sure how to phrase that though.

Post 2.8, we'd be correcting this properly anyway, we should aim for
the simplest-to-explain way to work around the limitation in the
current code, that will still work once the bug is fixed.  I am not
sure if "Technically it can be other things" helps, unless it makes
it a lot easier to use.

With that in mind, do you think we need to find a better phrase to
loosen what I wrote that is overly-strict?  That is, is "must begin
with '/' to anchor it to the level .gitignore appears" too strict to
make it too hard to use?

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