git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
To: Johannes Sixt <j6t@kdbg.org>
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Junio C Hamano" <gitster@pobox.com>,
	git@vger.kernel.org
Subject: Re: [PATCH] userdiff: two simplifications of patterns for rust
Date: Thu, 30 May 2019 20:59:04 +0200	[thread overview]
Message-ID: <875zprn4zr.fsf@evledraar.gmail.com> (raw)
In-Reply-To: <2d32b107-9278-faa0-4fea-afe662031272@kdbg.org>


On Thu, May 30 2019, Johannes Sixt wrote:

> - Do not enforce (but assume) syntactic correctness of language
>   constructs that go into hunk headers: we only want to ensure that
>   the keywords actually are words and not just the initial part of
>   some identifier.
>
> - In the word regex, match numbers only when they begin with a digit,
>   but then be liberal in what follows, assuming that the text that is
>   matched is syntactially correct.

I don't know if this is possible for Rust (but very much suspect so...),
but I think that in general we should aim to be more forgiving than not
with these patterns.

Because, as the history of userdiff.c shows, new keywords get introduced
into these languages, and old git versions survive for a long time. If
the syntax is otherwise fairly regular perhaps we don't need to hardcode
the list of existing keywords?

  reply	other threads:[~2019-05-30 18:59 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-20 17:04 [PATCH v3] userdiff: add built-in pattern for rust marcandre.lureau
2019-05-20 19:52 ` Johannes Sixt
2019-05-21 10:57   ` Marc-André Lureau
2019-05-28 16:34     ` Junio C Hamano
2019-05-28 20:31       ` Johannes Sixt
2019-05-28 21:01         ` Marc-André Lureau
2019-05-30 16:44           ` [PATCH] userdiff: two simplifications of patterns " Johannes Sixt
2019-05-30 18:59             ` Ævar Arnfjörð Bjarmason [this message]
2019-05-30 20:32               ` 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=875zprn4zr.fsf@evledraar.gmail.com \
    --to=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=j6t@kdbg.org \
    --cc=marcandre.lureau@redhat.com \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).