<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/userdiff.c, branch v2.19.0</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://www.git.shady.money/git/atom?h=v2.19.0</id>
<link rel='self' href='https://www.git.shady.money/git/atom?h=v2.19.0'/>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/'/>
<updated>2018-08-13T21:14:42Z</updated>
<entry>
<title>attr: remove an implicit dependency on the_index</title>
<updated>2018-08-13T21:14:42Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-08-13T16:14:20Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=7a400a2c0270f2085b70690e4ddbfd8d141e69ca'/>
<id>urn:sha1:7a400a2c0270f2085b70690e4ddbfd8d141e69ca</id>
<content type='text'>
Make the attr API take an index_state instead of assuming the_index in
attr code. All call sites are converted blindly to keep the patch
simple and retain current behavior. Individual call sites may receive
further updates to use the right index instead of the_index.

There is one ugly temporary workaround added in attr.c that needs some
more explanation.

Commit c24f3abace (apply: file commited with CRLF should roundtrip
diff and apply - 2017-08-19) forces one convert_to_git() call to NOT
read the index at all. But what do you know, we read it anyway by
falling back to the_index. When "istate" from convert_to_git is now
propagated down to read_attr_from_array() we will hit segfault
somewhere inside read_blob_data_from_index.

The right way of dealing with this is to kill "use_index" variable and
only follow "istate" but at this stage we are not ready for that:
while most git_attr_set_direction() calls just passes the_index to be
assigned to use_index, unpack-trees passes a different one which is
used by entry.c code, which has no way to know what index to use if we
delete use_index. So this has to be done later.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff: support new keywords in PHP hunk header</title>
<updated>2018-07-06T21:59:28Z</updated>
<author>
<name>Kana Natsuno</name>
<email>dev@whileimautomaton.net</email>
</author>
<published>2018-07-03T13:15:40Z</published>
<link rel='alternate' type='text/html' href='https://www.git.shady.money/git/commit/?id=1ab631647e3addd247c5482e8a3d4c9df7978c62'/>
<id>urn:sha1:1ab631647e3addd247c5482e8a3d4c9df7978c62</id>
<content type='text'>
Recent version of PHP supports interface, trait, abstract class and
final class.  This patch fixes the PHP hunk header regexp to support
all of these keywords.

Signed-off-by: Kana Natsuno &lt;dev@whileimautomaton.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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://www.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://www.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://www.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://www.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://www.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://www.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://www.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://www.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>
</feed>
