From: Junio C Hamano Date: Tue, 24 May 2016 22:18:59 GMT Subject: Re: [PATCH] userdiff: add built-in pattern for CSS Message-ID: In-Reply-To: <925654601.13199.1464127975010.JavaMail.zimbra@ensimag.grenoble-inp.fr> William Duclot writes: > I did have considered IPATTERN(), but assumed that case-sensitive was > default and case-insensitive was the exception. Don't assume, but ask ;-) > As the CSS pattern > does not deal with letters at all it seemed sensible to me to follow > the example of the HTML pattern, which use PATTERNS(). Did you notice that HTML pattern has to do an [Hh] that would be unnecessary if it chose to use IPATTTERN()? You do not have to ask a person, but instead ask the history. IPATTERN() was added at 909a5494 (userdiff.c: add builtin fortran regex patterns, 2010-09-10) when adding fortran support. Anything that existed before, including HTML, did [A-Za-z] when they could have done [a-z] if IPATTERN() existed back then. >> - In our codebase, we format multi-line comments in a particular >> way, namely >> >> /* >> * A multi-line comment begins with slash asterisk >> * on its own line, and its closing asterisk slash >> * also is on its own line. >> */ > > I take good note of that. I took example on the fortran pattern > comment, should I fix it too while I'm at it? Not "while you are at it". Making existing things better is welcome but such a change shouldn't be mixed with addition of new things. You can do it as a separate patch, probably as a preliminary clean-up before your change, if you want to. >> - Try not to write overlong lines. If your expression needs to >> become long and there is no good place to fold lines, that is one >> thing, but an overlong comment is unexcuable, as you can fold >> lines anywhere between words. > > Again, I take good note of that. > > Thank you for your time! Thank you for working on this.