<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/userdiff.c, branch v2.18.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.18.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.18.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-03-15T22:00:47Z</updated>
<entry>
<title>Merge branch 'tl/userdiff-csharp-async'</title>
<updated>2018-03-15T22:00:47Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-15T22:00:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e215e89791b97ebb6831504480c8ab4734a2117e'/>
<id>urn:sha1:e215e89791b97ebb6831504480c8ab4734a2117e</id>
<content type='text'>
Update funcname pattern used for C# to recognize "async" keyword.

* tl/userdiff-csharp-async:
  userdiff.c: add C# async keyword in diff pattern
</content>
</entry>
<entry>
<title>userdiff.c: add C# async keyword in diff pattern</title>
<updated>2018-03-08T19:03:32Z</updated>
<author>
<name>Thomas Levesque</name>
<email>thomas.levesque@gmail.com</email>
</author>
<published>2018-03-08T11:05:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a12cec99f8b64a0b99ae6f8a7e4724039406aea3'/>
<id>urn:sha1:a12cec99f8b64a0b99ae6f8a7e4724039406aea3</id>
<content type='text'>
Currently C# async methods are not shown in diff hunk headers. I just
added the async keyword to the csharp method pattern so that they are
properly detected.

Signed-off-by: Thomas Levesque &lt;thomas.levesque@gmail.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>Merge branch 'ik/userdiff-html-h-element-fix'</title>
<updated>2017-09-28T05:47:54Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-09-28T05:47:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=376a1da8391ee44da5cb1bffabc47c5569208ec4'/>
<id>urn:sha1:376a1da8391ee44da5cb1bffabc47c5569208ec4</id>
<content type='text'>
The built-in pattern to detect the "function header" for HTML did
not match &lt;H1&gt;..&lt;H6&gt; elements without any attributes, which has
been fixed.

* ik/userdiff-html-h-element-fix:
  userdiff: fix HTML hunk header regexp
</content>
</entry>
<entry>
<title>userdiff: fix HTML hunk header regexp</title>
<updated>2017-09-24T01:13:28Z</updated>
<author>
<name>Ilya Kantor</name>
<email>iliakan@gmail.com</email>
</author>
<published>2017-09-23T07:53:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9c03caca2c40870cf7f879d18e55db1c94877cd5'/>
<id>urn:sha1:9c03caca2c40870cf7f879d18e55db1c94877cd5</id>
<content type='text'>
Current HTML header regexp doesn't match headers without attributes.

So it fails to match &lt;h1&gt;...&lt;/h1&gt;, while &lt;h1 class="smth"&gt;...&lt;/h1&gt; matches.

Make attributes optional to fix this.  The regexp is still far from
perfect, but now it at least handles the common case.

Signed-off-by: Ilya Kantor &lt;iliakan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff: release strbuf after use in userdiff_get_textconv()</title>
<updated>2017-09-06T23:49:28Z</updated>
<author>
<name>Rene Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2017-08-30T18:20:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=460c7eb2bf5540384dfc18ace59abec6fa3aa009'/>
<id>urn:sha1:460c7eb2bf5540384dfc18ace59abec6fa3aa009</id>
<content type='text'>
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>config: don't include config.h by default</title>
<updated>2017-06-15T19:56:22Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-06-14T18:07:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2141fc1d20e659810245ec6ca1c143c60e033ec'/>
<id>urn:sha1:b2141fc1d20e659810245ec6ca1c143c60e033ec</id>
<content type='text'>
Stop including config.h by default in cache.h.  Instead only include
config.h in those files which require use of the config system.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>attr: convert git_check_attrs() callers to use the new API</title>
<updated>2017-02-01T21:46:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-28T02:01:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2aef63d31c338a764099e925d35fe2a9c71348a8'/>
<id>urn:sha1:2aef63d31c338a764099e925d35fe2a9c71348a8</id>
<content type='text'>
The remaining callers are all simple "I have N attributes I am
interested in.  I'll ask about them with various paths one by one".

After this step, no caller to git_check_attrs() remains.  After
removing it, we can extend "struct attr_check" struct with data
that can be used in optimizing the query for the specific N
attributes it contains.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>attr: rename function and struct related to checking attributes</title>
<updated>2017-02-01T21:46:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-01-28T02:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7bd18054d249d1f9aebad38d74ba6c53f8e6ecb3'/>
<id>urn:sha1:7bd18054d249d1f9aebad38d74ba6c53f8e6ecb3</id>
<content type='text'>
The traditional API to check attributes is to prepare an N-element
array of "struct git_attr_check" and pass N and the array to the
function "git_check_attr()" as arguments.

In preparation to revamp the API to pass a single structure, in
which these N elements are held, rename the type used for these
individual array elements to "struct attr_check_item" and rename
the function to "git_check_attrs()".

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Brandon Williams &lt;bmwill@google.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>
</feed>
