userdiff: two simplifications of patterns for rust
authorJohannes Sixt <j6t@kdbg.org>
Thu, 30 May 2019 16:44:35 +0000 (18:44 +0200)
committerJunio C Hamano <gitster@pobox.com>
Thu, 30 May 2019 16:53:26 +0000 (09:53 -0700)
commit33be7b38c23fbbaf75197f6150323e0d4c84bf12
tree6fe384d0333f95ad2c83efe3cad2794d83046fd0
parentd74e78602e3d562f5db64d553d4be21c201ef7b3
userdiff: two simplifications of patterns for rust

- 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.

Signed-off-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
userdiff.c