From: Dr. Adam Nielsen Date: Tue, 04 Jun 2019 17:22:43 GMT Subject: Re: [PATCH] make slash-rules more readable Message-ID: <8984a44f-b80c-9d04-3094-c17bb4e17d20@in-ici.net> In-Reply-To: <0c9f79f3-b43b-5f32-d217-ff92531c5da7@iee.org> Hi Philip On 04.06.19 14:34, Philip Oakley wrote: > I think the rules end up being difficult because we describe them from a > coders implementation viewpoint, rather than a users descriptive > viewpoint. Thus we avoided things like the difficult to code slashes in > the front/middle, and we get caught on the equivalent of neither/nor > phrases, which can even be difficult for native English speakers. > > Later on there is a recursively/respectively issue (latter not > explicitly mentioned).  There is also an "Except if" not-a-proper > sentence. (mentioned off-line) > > After sleeping on it, I came up with: > >    The slash '/' is used as the directory separator. Separators may >    occur at the beginning, middle or end of the .gitignore search pattern. > >    If there is a separator at the beginning or middle (or both) of the >    pattern, then the pattern is relative to the directory level of the >    particular .gitignore file itself. Otherwise the pattern may also >    match at any level below the .gitignore level. > >    If there is a separator at the end of the pattern then the pattern >    will only match directories, otherwise the pattern can match both >    files and directories. > >    Examples text.. > >    The special '*' ... > >    The special '**' ... > I am really happy about this improvement (or rather this new creation). In my opinion it is really easy to understand now, and it solves a ton of other issues we had with the preceding proposals. I will create a new patch. All the best, Adam