<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t4018-diff-funcname.sh, branch v2.20.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.20.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.20.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-03-01T21:36:49Z</updated>
<entry>
<title>userdiff: add built-in pattern for golang</title>
<updated>2018-03-01T21:36:49Z</updated>
<author>
<name>Alban Gruin</name>
<email>alban.gruin@gmail.com</email>
</author>
<published>2018-03-01T11:19:07Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1dbf0c0ad6cabfc35aa1896b4d94f4ee811ba803'/>
<id>urn:sha1:1dbf0c0ad6cabfc35aa1896b4d94f4ee811ba803</id>
<content type='text'>
This adds xfuncname and word_regex patterns for golang, a quite
popular programming language. It also includes test cases for the
xfuncname regex (t4018) and updated documentation.

The xfuncname regex finds functions, structs and interfaces.  Although
the Go language prohibits the opening brace from being on its own
line, the regex does not makes it mandatory, to be able to match
`func` statements like this:

    func foo(bar int,
    	baz int) {
    }

This is covered by the test case t4018/golang-long-func.

The word_regex pattern finds identifiers, integers, floats, complex
numbers and operators, according to the go specification.

Signed-off-by: Alban Gruin &lt;alban.gruin@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff: add built-in pattern for CSS</title>
<updated>2016-06-03T21:45:56Z</updated>
<author>
<name>William Duclot</name>
<email>william.duclot@ensimag.grenoble-inp.fr</email>
</author>
<published>2016-06-03T12:32:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0719f3eecd1234f6331cab980088239207e93335'/>
<id>urn:sha1:0719f3eecd1234f6331cab980088239207e93335</id>
<content type='text'>
CSS is widely used, motivating it being included as a built-in pattern.

It must be noted that the word_regex for CSS (i.e. the regex defining
what is a word in the language) does not consider '.' and '#' characters
(in CSS selectors) to be part of the word. This behavior is documented
by the test t/t4018/css-rule.
The logic behind this behavior is the following: identifiers in CSS
selectors are identifiers in a HTML/XML document. Therefore, the '.'/'#'
character are not part of the identifier, but an indicator of the nature
of the identifier in HTML/XML (class or id). Diffing ".class1" and
".class2" must show that the class name is changed, but we still are
selecting a class.

Logic behind the "pattern" regex is:
    1. reject lines ending with a colon/semicolon (properties)
    2. if a line begins with a name in column 1, pick the whole line

Credits to Johannes Sixt (j6t@kdbg.org) for the pattern regex and most
of the tests.

Signed-off-by: William Duclot &lt;william.duclot@ensimag.grenoble-inp.fr&gt;
Signed-off-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&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 support for Fountain documents</title>
<updated>2015-07-23T21:44:51Z</updated>
<author>
<name>Zoë Blade</name>
<email>zoe@bytenoise.co.uk</email>
</author>
<published>2015-07-21T13:22:46Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=69f9c87d4654aad8011444727194c3053827ae07'/>
<id>urn:sha1:69f9c87d4654aad8011444727194c3053827ae07</id>
<content type='text'>
Add support for Fountain, a plain text screenplay format.  Git
facilitates not just programming specifically, but creative writing
in general, so it makes sense to also support other plain text
documents besides source code.

In the structure of a screenplay specifically, scenes are roughly
analogous to functions, in the sense that it makes your job easier
if you can see which ones were changed in a given range of patches.

More information about the Fountain format can be found on its
official website, at http://fountain.io .

Signed-off-by: Zoë Blade &lt;zoe@bytenoise.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tests: fix negated test_i18ngrep calls</title>
<updated>2014-08-13T20:12:06Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2014-08-13T19:30:11Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41ca19b6a6ca5ad6fea246bd400717c16b80b32c'/>
<id>urn:sha1:41ca19b6a6ca5ad6fea246bd400717c16b80b32c</id>
<content type='text'>
The helper function test_i18ngrep pretends that it found the expected
results when it is running under GETTEXT_POISON. For this reason, it must
not be used negated like so

   ! test_i18ngrep foo bar

because the test case would fail under GETTEXT_POISON. The function offers
a special syntax to test that a pattern is *not* found:

   test_i18ngrep ! foo bar

Convert incorrect uses to this syntax.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t4018: reduce test files for pattern compilation tests</title>
<updated>2014-03-21T22:03:28Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2014-03-21T21:07:19Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ad5070fb363b1e7ee7e1df83a17f4e8e1eb607a0'/>
<id>urn:sha1:ad5070fb363b1e7ee7e1df83a17f4e8e1eb607a0</id>
<content type='text'>
All test cases that need a file with specific text patterns have been
converted to utilize texts in the t4018/ directory. The remaining tests
in the test script deal only with the validity of the regular
expressions. These tests do not depend on the contents of files that
'git diff' is invoked on. Remove the largish here-document and use only
tiny files.

While we are touching these tests, convert grep to test_i18ngrep as the
texts checked for may undergo translation in the future.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t4018: convert custom pattern test to the new infrastructure</title>
<updated>2014-03-21T22:02:57Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2014-03-21T21:07:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f1b75fbaf1380e00668f775f27ba8dd52b78a081'/>
<id>urn:sha1:f1b75fbaf1380e00668f775f27ba8dd52b78a081</id>
<content type='text'>
For the test case "matches to end of line", extend the pattern by a few
wildcards so that the pattern captures the "RIGHT" token, which is needed
for verification, without mentioning it in the pattern.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t4018: convert java pattern test to the new infrastructure</title>
<updated>2014-03-21T22:02:36Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2014-03-21T21:07:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dd4dc5c574c0849fef6855d9efdfae5dc9369f2d'/>
<id>urn:sha1:dd4dc5c574c0849fef6855d9efdfae5dc9369f2d</id>
<content type='text'>
Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t4018: convert perl pattern tests to the new infrastructure</title>
<updated>2014-03-21T22:02:19Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2014-03-21T21:07:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2d08413ba1ce0a1940e97a5a8af5faf40ab8d178'/>
<id>urn:sha1:2d08413ba1ce0a1940e97a5a8af5faf40ab8d178</id>
<content type='text'>
There is one subtlety: The old test case 'perl pattern gets full line of
POD header' does not have its own new test case, but the feature is
tested nevertheless by placing the RIGHT tag at the end of the expected
hunk header in t4018/perl-skip-sub-in-pod.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t4018: an infrastructure to test hunk headers</title>
<updated>2014-03-21T22:00:51Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2014-03-21T21:07:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=bfa7d01413bd02b5b3675ef0e96f764064a13ce8'/>
<id>urn:sha1:bfa7d01413bd02b5b3675ef0e96f764064a13ce8</id>
<content type='text'>
Add an infrastructure that simplifies adding new tests of the hunk
header regular expressions.

To add new tests, a file with the syntax to test can be dropped in the
directory t4018. The README file explains how a test file must contain;
the README itself tests the default behavior.

Signed-off-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 'rr/tests-dedup-test-config'</title>
<updated>2013-03-28T21:38:23Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-03-28T21:38:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4806c8c5cae6864f7a478be3b32b3aa354aaad66'/>
<id>urn:sha1:4806c8c5cae6864f7a478be3b32b3aa354aaad66</id>
<content type='text'>
* rr/tests-dedup-test-config:
  t4018,7810,7811: remove test_config() redefinition
</content>
</entry>
</feed>
