All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Moy <Matthieu.Moy@grenoble-inp.fr>
To: Johannes Sixt <j6t@kdbg.org>
Cc: William Duclot <william.duclot@ensimag.grenoble-inp.fr>,
	git@vger.kernel.org, simon.rabourg@ensimag.grenoble-inp.fr,
	antoine.queru@ensimag.grenoble-inp.fr,
	francois.beutin@ensimag.grenoble-inp.fr, gitster@pobox.com
Subject: Re: [PATCH] userdiff: add built-in pattern for CSS
Date: Fri, 03 Jun 2016 08:41:53 +0200	[thread overview]
Message-ID: <vpqr3ce6afi.fsf@anie.imag.fr> (raw)
In-Reply-To: <57511B2D.7040501@kdbg.org> (Johannes Sixt's message of "Fri, 3 Jun 2016 07:52:45 +0200")

Johannes Sixt <j6t@kdbg.org> writes:

>> +IPATTERN("css",
>> +	 "!^.*;\n"
>
> Is there a difference between this and "!;\n"? Is it necessary to
> anchor the pattern at the beginning of the line?

Also, you don't want to force the end of line right after ;. I know
trailing whitespaces are evil, but users may not deserve to be punished
so hard when they have some ;-).

> In the commit message you talk about colon (':'), but you actually use
> a semicolon (';'). Thinking a bit more about it, rejecting lines with
> either one would be even better. Consider this case (without the
> indentation):

Rejecting colon anywhere in the line would also reject valid patterns
like this:

a:hover {

Rejecting it at end of line is probably a good trade-off.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

  reply	other threads:[~2016-06-03  6:42 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-20 13:28 [PATCH] userdiff: add built-in pattern for CSS William Duclot
2016-05-20 22:37 ` Junio C Hamano
2016-05-24 14:25 ` William Duclot
2016-05-24 19:06   ` Junio C Hamano
2016-05-24 22:12     ` William Duclot
2016-05-24 22:18       ` Junio C Hamano
2016-05-26 21:11   ` Johannes Sixt
2016-05-27  7:48     ` William Duclot
2016-06-02 22:48   ` William Duclot
2016-06-02 23:07     ` Junio C Hamano
2016-06-03  5:52     ` Johannes Sixt
2016-06-03  6:41       ` Matthieu Moy [this message]
2016-06-03  6:56         ` Johannes Sixt
2016-06-03  9:45       ` William Duclot
2016-06-03 15:50         ` Junio C Hamano
2016-06-06  7:28           ` William Duclot
2016-06-06 18:00             ` Junio C Hamano
2016-06-06 20:45               ` William Duclot
2016-06-06 20:55                 ` Junio C Hamano
2016-06-03 12:32     ` William Duclot
2016-06-03 21:31       ` Johannes Sixt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vpqr3ce6afi.fsf@anie.imag.fr \
    --to=matthieu.moy@grenoble-inp.fr \
    --cc=antoine.queru@ensimag.grenoble-inp.fr \
    --cc=francois.beutin@ensimag.grenoble-inp.fr \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=simon.rabourg@ensimag.grenoble-inp.fr \
    --cc=william.duclot@ensimag.grenoble-inp.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.