<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/userdiff.c, branch v2.30.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.30.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.30.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-11-02T21:17:46Z</updated>
<entry>
<title>Merge branch 've/userdiff-bash'</title>
<updated>2020-11-02T21:17:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-11-02T21:17:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=292e53fa9d2cf6d0b6d6adbbdc6dfc665bd4babe'/>
<id>urn:sha1:292e53fa9d2cf6d0b6d6adbbdc6dfc665bd4babe</id>
<content type='text'>
The userdiff pattern learned to identify the function definition in
POSIX shells and bash.

* ve/userdiff-bash:
  userdiff: support Bash
</content>
</entry>
<entry>
<title>Merge branch 'sd/userdiff-css-update'</title>
<updated>2020-10-27T22:09:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-10-27T22:09:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2810828d7cc3b215f3e97ec2acba8d5783b7369d'/>
<id>urn:sha1:2810828d7cc3b215f3e97ec2acba8d5783b7369d</id>
<content type='text'>
Userdiff for CSS update.

* sd/userdiff-css-update:
  userdiff: expand detected chunk headers for css
</content>
</entry>
<entry>
<title>Merge branch 'kb/userdiff-rust-macro-rules'</title>
<updated>2020-10-27T22:09:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-10-27T22:09:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc53e7bc20347778cafb80d41bc37ce1a8902d55'/>
<id>urn:sha1:dc53e7bc20347778cafb80d41bc37ce1a8902d55</id>
<content type='text'>
Userdiff for Rust update.

* kb/userdiff-rust-macro-rules:
  userdiff: recognize 'macro_rules!' as starting a Rust function block
</content>
</entry>
<entry>
<title>userdiff: support Bash</title>
<updated>2020-10-22T17:29:30Z</updated>
<author>
<name>Victor Engmark</name>
<email>victor@engmark.name</email>
</author>
<published>2020-10-21T23:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2ff6c34612057baccbd841524106c5a05f6be6d6'/>
<id>urn:sha1:2ff6c34612057baccbd841524106c5a05f6be6d6</id>
<content type='text'>
Support POSIX, bashism and mixed function declarations, all four
compound command types, trailing comments and mixed whitespace.

Even though Bash allows locale-dependent characters in function names
&lt;https://unix.stackexchange.com/a/245336/3645&gt;, only detect function
names with characters allowed by POSIX.1-2017
&lt;https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_235&gt;
for simplicity. This should cover the vast majority of use cases, and
produces system-agnostic results.

Since a word pattern has to be specified, but there is no easy way to
know the default word pattern, use the default `IFS` characters for a
starter. A later patch can improve this.

Signed-off-by: Victor Engmark &lt;victor@engmark.name&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff: expand detected chunk headers for css</title>
<updated>2020-10-08T17:21:11Z</updated>
<author>
<name>Sohom Datta</name>
<email>sohom.datta@learner.manipal.edu</email>
</author>
<published>2020-10-08T08:36:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff01513f45a74d08fdd43f72461800a915e15c90'/>
<id>urn:sha1:ff01513f45a74d08fdd43f72461800a915e15c90</id>
<content type='text'>
The regex used for the CSS builtin diff driver in git is only
able to show chunk headers for lines that start with a number,
a letter or an underscore.

However, the regex fails to detect classes (starts with a .), ids
(starts with a #), :root and attribute-value based selectors (for
example [class*="col-"]), as well as @based block-level statements
like @page,@keyframes and @media since all of them, start with a
special character.

Allow the selectors and block level statements to begin with these
special characters.

Signed-off-by: Sohom Datta &lt;sohom.datta@learner.manipal.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff: recognize 'macro_rules!' as starting a Rust function block</title>
<updated>2020-10-07T15:48:20Z</updated>
<author>
<name>Konrad Borowski</name>
<email>konrad@borowski.pw</email>
</author>
<published>2020-10-07T13:26:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a04c7e0f1b6680385945ea901283d6335c4c108a'/>
<id>urn:sha1:a04c7e0f1b6680385945ea901283d6335c4c108a</id>
<content type='text'>
Signed-off-by: Konrad Borowski &lt;konrad@borowski.pw&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff: PHP: catch "abstract" and "final" functions</title>
<updated>2020-10-07T15:45:43Z</updated>
<author>
<name>Javier Spagnoletti</name>
<email>phansys@gmail.com</email>
</author>
<published>2020-10-07T03:38:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=aff92827b54f4b7f9e339982a49bab4bdbd1fc55'/>
<id>urn:sha1:aff92827b54f4b7f9e339982a49bab4bdbd1fc55</id>
<content type='text'>
PHP permits functions to be defined like

       final public function foo() { }
       abstract protected function bar() { }

but our hunk header pattern does not recognize these decorations.
Add "final" and "abstract" to the list of function modifiers.

Helped-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Javier Spagnoletti &lt;phansys@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff: improve Fortran xfuncname regex</title>
<updated>2020-08-13T18:21:18Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2020-08-12T22:30:29Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=75c3b6b2e8a72239fa23e039c46f9a5cf8c24142'/>
<id>urn:sha1:75c3b6b2e8a72239fa23e039c46f9a5cf8c24142</id>
<content type='text'>
The third part of the Fortran xfuncname regex wants to match the
beginning of a subroutine or function, so it allows for all characters
except `'`, `"` or whitespace before the keyword 'function' or
'subroutine'. This is meant to match the 'recursive', 'elemental' or
'pure' keywords, as well as function return types, and to prevent
matches inside strings.

However, the negated set does not contain the `!` comment character,
so a line with an end-of-line comment containing the keyword 'function' or
'subroutine' followed by another word is mistakenly chosen as a hunk header.

Improve the regex by adding `!` to the negated set.

Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff: add tests for Fortran xfuncname regex</title>
<updated>2020-08-13T18:21:17Z</updated>
<author>
<name>Philippe Blain</name>
<email>levraiphilippeblain@gmail.com</email>
</author>
<published>2020-08-12T22:30:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b79e6925f0ff8ae0afa6554224a5a2e1c41a4605'/>
<id>urn:sha1:b79e6925f0ff8ae0afa6554224a5a2e1c41a4605</id>
<content type='text'>
The Fortran userdiff patterns, introduced in 909a5494f8 (userdiff.c: add
builtin fortran regex patterns, 2010-09-10), predate the test
infrastructure for xfuncname patterns, introduced in bfa7d01413 (t4018:
an infrastructure to test hunk headers, 2014-03-21).

Add tests for the Fortran xfuncname patterns. The test
't/t4018/fortran-comment-keyword' documents a shortcoming of the regex
that is fixed in a subsequent commit.

While at it, add descriptive comments for the different parts of the
regex.

Signed-off-by: Philippe Blain &lt;levraiphilippeblain@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ah/userdiff-markdown'</title>
<updated>2020-05-08T21:25:01Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-05-08T21:25:01Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dc4c3933b189f7c3087008d3dc2b16ef8325ab1b'/>
<id>urn:sha1:dc4c3933b189f7c3087008d3dc2b16ef8325ab1b</id>
<content type='text'>
The userdiff patterns for Markdown documents have been added.

* ah/userdiff-markdown:
  userdiff: support Markdown
</content>
</entry>
</feed>
