<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/userdiff.c, branch v2.28.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.28.1</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.28.1'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2020-05-08T21:25:01Z</updated>
<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://www.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://www.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://www.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://www.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://www.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://www.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://www.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://www.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>
<entry>
<title>userdiff: fix some corner cases in dts regex</title>
<updated>2019-10-21T08:44:12Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@kernel.org</email>
</author>
<published>2019-10-20T18:52:30Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=8da56a484800023a545d7a7c022473f5aa9e720f'/>
<id>urn:sha1:8da56a484800023a545d7a7c022473f5aa9e720f</id>
<content type='text'>
While reviewing some dts diffs recently I noticed that the hunk header
logic was failing to find the containing node. This is because the regex
doesn't consider properties that may span multiple lines, i.e.

	property = &lt;something&gt;,
		   &lt;something_else&gt;;

and it got hung up on comments inside nodes that look like the root node
because they start with '/*'. Add tests for these cases and update the
regex to find them. Maybe detecting the root node is too complicated but
forcing it to be a backslash with any amount of whitespace up to an open
bracket seemed OK. I tried to detect that a comment is in-between the
two parts but I wasn't happy so I just dropped it.

Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Frank Rowand &lt;frowand.list@gmail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Reviewed-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 a builtin pattern for dts files</title>
<updated>2019-08-21T22:09:34Z</updated>
<author>
<name>Stephen Boyd</name>
<email>sboyd@kernel.org</email>
</author>
<published>2019-08-19T21:22:43Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=3c81760bc66376c3ac69c39475cbe3b13e97e798'/>
<id>urn:sha1:3c81760bc66376c3ac69c39475cbe3b13e97e798</id>
<content type='text'>
The Linux kernel receives many patches to the devicetree files each
release. The hunk header for those patches typically show nothing,
making it difficult to figure out what node is being modified without
applying the patch or opening the file and seeking to the context. Let's
add a builtin 'dts' pattern to git so that users can get better diff
output on dts files when they use the diff=dts driver.

The regex has been constructed based on the spec at devicetree.org[1]
and with some help from Johannes Sixt.

[1] https://github.com/devicetree-org/devicetree-specification/releases/latest

Cc: Rob Herring &lt;robh+dt@kernel.org&gt;
Cc: Frank Rowand &lt;frowand.list@gmail.com&gt;
Signed-off-by: Stephen Boyd &lt;sboyd@kernel.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
