<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/userdiff.c, branch v2.32.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.32.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.32.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2021-04-21T00:23:34Z</updated>
<entry>
<title>Merge branch 'ab/userdiff-tests'</title>
<updated>2021-04-21T00:23:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2021-04-21T00:23:34Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ab99efc817d463ddcd507a6457d33cd7643ed6dd'/>
<id>urn:sha1:ab99efc817d463ddcd507a6457d33cd7643ed6dd</id>
<content type='text'>
A bit of code clean-up and a lot of test clean-up around userdiff
area.

* ab/userdiff-tests:
  blame tests: simplify userdiff driver test
  blame tests: don't rely on t/t4018/ directory
  userdiff: remove support for "broken" tests
  userdiff tests: list builtin drivers via test-tool
  userdiff tests: explicitly test "default" pattern
  userdiff: add and use for_each_userdiff_driver()
  userdiff style: normalize pascal regex declaration
  userdiff style: declare patterns with consistent style
  userdiff style: re-order drivers in alphabetical order
</content>
</entry>
<entry>
<title>userdiff: add support for Scheme</title>
<updated>2021-04-08T20:56:09Z</updated>
<author>
<name>Atharva Raykar</name>
<email>raykar.ath@gmail.com</email>
</author>
<published>2021-04-08T09:14:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a43739031092f951674d783ad3bdcbd603281851'/>
<id>urn:sha1:a43739031092f951674d783ad3bdcbd603281851</id>
<content type='text'>
Add a diff driver for Scheme-like languages which recognizes top level
and local `define` forms, whether it is a function definition, binding,
syntax definition or a user-defined `define-xyzzy` form.

Also supports R6RS `library` forms, `module` forms along with class and
struct declarations used in Racket (PLT Scheme).

Alternate "def" syntax such as those in Gerbil Scheme are also
supported, like defstruct, defsyntax and so on.

The rationale for picking `define` forms for the hunk headers is because
it is usually the only significant form for defining the structure of
the program, and it is a common pattern for schemers to have local
function definitions to hide their visibility, so it is not only the top
level `define`'s that are of interest. Schemers also extend the language
with macros to provide their own define forms (for example, something
like a `define-test-suite`) which is also captured in the hunk header.

Since it is common practice to extend syntax with variants of a form
like `module+`, `class*` etc, those have been supported as well.

The word regex is a best-effort attempt to conform to R7RS[1] valid
identifiers, symbols and numbers.

[1] https://small.r7rs.org/attachment/r7rs.pdf (section 2.1)

Signed-off-by: Atharva Raykar &lt;raykar.ath@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff: add and use for_each_userdiff_driver()</title>
<updated>2021-04-08T19:19:10Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-04-08T15:04:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f12fa9ee6c87efa8a926973bd203ef327686fb62'/>
<id>urn:sha1:f12fa9ee6c87efa8a926973bd203ef327686fb62</id>
<content type='text'>
Refactor the userdiff_find_by_namelen() function so that a new
for_each_userdiff_driver() API function does most of the work.

This will be useful for the same reason we've got other for_each_*()
API functions as part of various APIs, and will be used in a follow-up
commit.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff style: normalize pascal regex declaration</title>
<updated>2021-04-08T19:19:09Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-04-08T15:04:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=82512e008c82834df5a00ea79e1091da45b330b0'/>
<id>urn:sha1:82512e008c82834df5a00ea79e1091da45b330b0</id>
<content type='text'>
Declare the pascal pattern consistently with how we declare the
others, not having "\n" on one line by itself, but as part of the
pattern, and when there are alterations have the "|" at the start, not
end of the line.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff style: declare patterns with consistent style</title>
<updated>2021-04-08T19:19:09Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-04-08T15:04:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6d1c9c527e5d2f4a00827ee2eac29709a1aff1ee'/>
<id>urn:sha1:6d1c9c527e5d2f4a00827ee2eac29709a1aff1ee</id>
<content type='text'>
Change those patterns which were declared with a regex on the same
line as the "PATTERNS()" line to put that regex on the next line, and
add missing "/* -- */" separator comments between the pattern and
word_regex.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff style: re-order drivers in alphabetical order</title>
<updated>2021-04-08T19:19:09Z</updated>
<author>
<name>Ævar Arnfjörð Bjarmason</name>
<email>avarab@gmail.com</email>
</author>
<published>2021-04-08T15:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ddd164d026d24fd5a2ca3e3d0be06bbcaebb2476'/>
<id>urn:sha1:ddd164d026d24fd5a2ca3e3d0be06bbcaebb2476</id>
<content type='text'>
Address some old code smell and move around the built-in userdiff
drivers so they're both in alphabetical order, and now in the same
order they appear in the gitattributes(5) documentation.

The two started drifting in be58e70dba (diff: unify external diff and
funcname parsing code, 2008-10-05), and then even further in
80c49c3de2 (color-words: make regex configurable via attributes,
2009-01-17) when the "cpp" pattern was added.

There are no functional changes here, and as --color-moved will show
only moved existing lines.

Signed-off-by: Ævar Arnfjörð Bjarmason &lt;avarab@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
