<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/userdiff.c, branch v2.29.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.29.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.29.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-08-13T18:21:18Z</updated>
<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>
<entry>
<title>userdiff: support Markdown</title>
<updated>2020-05-03T01:04:12Z</updated>
<author>
<name>Ash Holland</name>
<email>ash@sorrel.sh</email>
</author>
<published>2020-05-02T13:15:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=09dad9256a32affc4a3bc0cf1fa45d5fa6f51231'/>
<id>urn:sha1:09dad9256a32affc4a3bc0cf1fa45d5fa6f51231</id>
<content type='text'>
It's typical to find Markdown documentation alongside source code, and
having better context for documentation changes is useful; see also
commit 69f9c87d4 (userdiff: add support for Fountain documents,
2015-07-21).

The pattern is based on the CommonMark specification 0.29, section 4.2
&lt;https://spec.commonmark.org/&gt; but doesn't match empty headings, as
seeing them in a hunk header is unlikely to be useful.

Only ATX headings are supported, as detecting setext headings would
require printing the line before a pattern matches, or matching a
multiline pattern. The word-diff pattern is the same as the pattern for
HTML, because many Markdown parsers accept inline HTML.

Signed-off-by: Ash Holland &lt;ash@sorrel.sh&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>parse_config_key(): return subsection len as size_t</title>
<updated>2020-04-10T21:44:29Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-04-10T19:44:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f5914f4b6bcdb517733c761fe5ba9d94471eb01d'/>
<id>urn:sha1:f5914f4b6bcdb517733c761fe5ba9d94471eb01d</id>
<content type='text'>
We return the length to a subset of a string using an "int *"
out-parameter. This is fine most of the time, as we'd expect config keys
to be relatively short, but it could behave oddly if we had a gigantic
config key. A more appropriate type is size_t.

Let's switch over, which lets our callers use size_t as appropriate
(they are bound by our type because they must pass the out-parameter as
a pointer). This is mostly just a cleanup to make it clear this code
handles long strings correctly. In practice, our config parser already
chokes on long key names (because of a similar int/size_t mixup!).

When doing an int/size_t conversion, we have to be careful that nobody
was trying to assign a negative value to the variable. I manually
confirmed that for each case here. They tend to just feed the result to
xmemdupz() or similar; in a few cases I adjusted the parameter types for
helper functions to make sure the size_t is preserved.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ln/userdiff-elixir'</title>
<updated>2019-12-25T19:21:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-25T19:21:59Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ba6b66281ebc8d863c2b0fb27ede640e4f212dd9'/>
<id>urn:sha1:ba6b66281ebc8d863c2b0fb27ede640e4f212dd9</id>
<content type='text'>
Hotfix.

* ln/userdiff-elixir:
  userdiff: remove empty subexpression from elixir regex
</content>
</entry>
<entry>
<title>userdiff: remove empty subexpression from elixir regex</title>
<updated>2019-12-13T20:20:48Z</updated>
<author>
<name>Ed Maste</name>
<email>emaste@FreeBSD.org</email>
</author>
<published>2019-12-13T17:55:35Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d1b1384d6163efb85c3a93ee535cd795d92fec21'/>
<id>urn:sha1:d1b1384d6163efb85c3a93ee535cd795d92fec21</id>
<content type='text'>
The regex failed to compile on FreeBSD.

Also add /* -- */ mark to separate the two regex entries given to
the PATTERNS() macro, to make it consistent with patterns for other
content types.

Signed-off-by: Ed Maste &lt;emaste@FreeBSD.org&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Helped-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jh/userdiff-python-async'</title>
<updated>2019-12-05T20:52:44Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2019-12-05T20:52:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9502b616f187c567b93db69cd9c6f0028019bd15'/>
<id>urn:sha1:9502b616f187c567b93db69cd9c6f0028019bd15</id>
<content type='text'>
The userdiff machinery has been taught that "async def" is another
way to begin a "function" in Python.

* jh/userdiff-python-async:
  userdiff: support Python async functions
</content>
</entry>
<entry>
<title>userdiff: support Python async functions</title>
<updated>2019-11-20T07:31:43Z</updated>
<author>
<name>Josh Holland</name>
<email>anowlcalledjosh@gmail.com</email>
</author>
<published>2019-11-19T15:08:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=077a1fda82b237c16eb10bd988650468683a94b5'/>
<id>urn:sha1:077a1fda82b237c16eb10bd988650468683a94b5</id>
<content type='text'>
Python's async functions (declared with "async def" rather than "def")
were not being displayed in hunk headers. This commit teaches git about
the async function syntax, and adds tests for the Python userdiff regex.

Signed-off-by: Josh Holland &lt;anowlcalledjosh@gmail.com&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: add Elixir to supported userdiff languages</title>
<updated>2019-11-10T06:26:26Z</updated>
<author>
<name>Łukasz Niemier</name>
<email>lukasz@niemier.pl</email>
</author>
<published>2019-11-08T21:38:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a807200f67588f6e30a7b6ac4a3ad97ad176ccc7'/>
<id>urn:sha1:a807200f67588f6e30a7b6ac4a3ad97ad176ccc7</id>
<content type='text'>
Adds support for xfuncref in Elixir[1] language which is Ruby-like
language that runs on Erlang[3] Virtual Machine (BEAM).

[1]: https://elixir-lang.org
[2]: https://www.erlang.org

Signed-off-by: Łukasz Niemier &lt;lukasz@niemier.pl&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
