Thread (1 message) 1 message, 1 author, 2016-06-16

Re: [PATCH] userdiff: add built-in pattern for CSS

From: Junio C Hamano <hidden>
Date: 2016-06-16 02:19:35

William Duclot [off-list ref] 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.
quoted
 - 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.
quoted
 - 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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help