<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t4018-diff-funcname.sh, branch v2.26.1</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.26.1</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.26.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2020-01-30T22:17:09Z</updated>
<entry>
<title>Merge branch 'jk/test-fixes'</title>
<updated>2020-01-30T22:17:09Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2020-01-30T22:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0afeb3fdf4be28189a26df1d9158bc182da637cd'/>
<id>urn:sha1:0afeb3fdf4be28189a26df1d9158bc182da637cd</id>
<content type='text'>
Test fixes.

* jk/test-fixes:
  t7800: don't rely on reuse_worktree_file()
  t4018: drop "debugging" cat from hunk-header tests
</content>
</entry>
<entry>
<title>t4018: drop "debugging" cat from hunk-header tests</title>
<updated>2020-01-16T22:46:28Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2020-01-16T18:34:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fbce03d3291e80b76a75d37a44ecf4ab238e6837'/>
<id>urn:sha1:fbce03d3291e80b76a75d37a44ecf4ab238e6837</id>
<content type='text'>
We run a series of hunk-header tests in a loop, and each one does this:

  test_when_finished 'cat actual' &amp;&amp;      # for debugging only

This is pretty pointless. When the test succeeds, we waste time running
a useless cat process. If you're debugging a failure with "-i", then we
won't run the when-finished part at all. So it helps only if you're
running with something like "--verbose-log".

Since we expect the tests to succeed most of the time, a better way to
do this would be a helper that checks the output and dumps "actual" only
when it fails. But it's probably not even worth the effort, as anyone
debugging a failure could just run with "-i" and investigate the
"actual" file themselves.

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>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>
<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://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>
<entry>
<title>userdiff: add built-in pattern for rust</title>
<updated>2019-05-17T03:54:02Z</updated>
<author>
<name>Marc-André Lureau</name>
<email>mlureau@redhat.com</email>
</author>
<published>2019-05-16T23:58:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d74e78602e3d562f5db64d553d4be21c201ef7b3'/>
<id>urn:sha1:d74e78602e3d562f5db64d553d4be21c201ef7b3</id>
<content type='text'>
This adds xfuncname and word_regex patterns for Rust, a quite
popular programming language. It also includes test cases for the
xfuncname regex (t4018) and updated documentation.

The word_regex pattern finds identifiers, integers, floats and
operators, according to the Rust Reference Book.

Cc: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>
</feed>
