<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/userdiff.c, branch v1.7.3.5</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.3.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.7.3.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2010-12-19T06:58:40Z</updated>
<entry>
<title>userdiff: fix typo in ruby and python word regexes</title>
<updated>2010-12-19T06:58:40Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2010-12-18T16:17:53Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=b34f69f9916e52e742f35c2f88286375142260de'/>
<id>urn:sha1:b34f69f9916e52e742f35c2f88286375142260de</id>
<content type='text'>
Both had an unclosed ] that ruined the safeguard against not matching
a non-space char.

Signed-off-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>userdiff.c: add builtin fortran regex patterns</title>
<updated>2010-09-10T16:38:29Z</updated>
<author>
<name>Brandon Casey</name>
<email>drafnel@gmail.com</email>
</author>
<published>2010-09-10T16:18:14Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=909a5494f869371565ed9326e984adeabf42611d'/>
<id>urn:sha1:909a5494f869371565ed9326e984adeabf42611d</id>
<content type='text'>
This adds fortran xfuncname and wordRegex patterns to the list of builtin
patterns.  The intention is for the patterns to be appropriate for all
versions of fortran including 77, 90, 95.  The patterns can be enabled by
adding the diff=fortran attribute to the .gitattributes file for the
desired file glob.

This also adds a new macro named IPATTERN which is just like the PATTERNS
macro except it sets the REG_ICASE flag so that case will be ignored.

The test code in t4018 and the docs were updated as appropriate.

Signed-off-by: Brandon Casey &lt;casey@nrlssc.navy.mil&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Userdiff patterns for C#</title>
<updated>2010-08-17T01:28:27Z</updated>
<author>
<name>Petr Onderka</name>
<email>gsvick@gmail.com</email>
</author>
<published>2010-08-16T17:01:02Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=b221207db9950cb0993a30f38540ff235a0af64e'/>
<id>urn:sha1:b221207db9950cb0993a30f38540ff235a0af64e</id>
<content type='text'>
Add userdiff patterns for C#. This code is an improved version of
code by Adam Petaccia from 21 June 2009 mail to the list.

Signed-off-by: Petr Onderka &lt;gsvick@gmail.com&gt;
Acked-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bs/userdiff-php'</title>
<updated>2010-06-13T18:22:05Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-06-13T18:22:05Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9559910cac77526a95dd5dca93a2e3e6d290c5b9'/>
<id>urn:sha1:9559910cac77526a95dd5dca93a2e3e6d290c5b9</id>
<content type='text'>
* bs/userdiff-php:
  diff: Support visibility modifiers in the PHP hunk header regexp
</content>
</entry>
<entry>
<title>diff: Support visibility modifiers in the PHP hunk header regexp</title>
<updated>2010-05-27T14:12:07Z</updated>
<author>
<name>Björn Steinbrink</name>
<email>B.Steinbrink@gmx.de</email>
</author>
<published>2010-05-23T18:05:40Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=6d2f208c3dd39493f4d45ea67c55a1b7fe06626a'/>
<id>urn:sha1:6d2f208c3dd39493f4d45ea67c55a1b7fe06626a</id>
<content type='text'>
Starting with PHP5, class methods can have a visibility modifier, which
caused the methods not to be matched by the existing regexp, so extend
the regexp to match those modifiers. And while we're at it, allow the
"static" modifier as well.

Since the "static" modifier can appear either before or after the
visibility modifier, let's just allow any number of modifiers to appear
in any order, as that simplifies the regexp and shouldn't cause any
false positives.

Signed-off-by: BjÃ¶rn Steinbrink &lt;B.Steinbrink@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>diff: cache textconv output</title>
<updated>2010-04-02T07:05:31Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2010-04-02T00:12:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d9bae1a178f0f8b198ea611e874975214ad6f990'/>
<id>urn:sha1:d9bae1a178f0f8b198ea611e874975214ad6f990</id>
<content type='text'>
Running a textconv filter can take a long time. It's
particularly bad for a large file which needs to be spooled
to disk, but even for small files, the fork+exec overhead
can add up for something like "git log -p".

This patch uses the notes-cache mechanism to keep a fast
cache of textconv output. Caches are stored in
refs/notes/textconv/$x, where $x is the userdiff driver
defined in gitattributes.

Caching is enabled only if diff.$x.cachetextconv is true.

In my test repo, on a commit with 45 jpg and avi files
changed and a textconv to show their exif tags:

  [before]
  $ time git show &gt;/dev/null
  real    0m13.724s
  user    0m12.057s
  sys     0m1.624s

  [after, first run]
  $ git config diff.mfo.cachetextconv true
  $ time git show &gt;/dev/null
  real    0m14.252s
  user    0m12.197s
  sys     0m1.800s

  [after, subsequent runs]
  $ time git show &gt;/dev/null
  real    0m0.352s
  user    0m0.148s
  sys     0m0.200s

So for a slight (3.8%) cost on the first run, we achieve an
almost 40x speed up on subsequent runs.

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>git_attr(): fix function signature</title>
<updated>2010-01-17T04:39:59Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-01-17T04:39:59Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=7fb0eaa289576a1dcd7751015ba791f1bce778a9'/>
<id>urn:sha1:7fb0eaa289576a1dcd7751015ba791f1bce778a9</id>
<content type='text'>
The function took (name, namelen) as its arguments, but all the public
callers wanted to pass a full string.

Demote the counted-string interface to an internal API status, and allow
public callers to just pass the string to the function.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>avoid exponential regex match for java and objc function names</title>
<updated>2009-06-18T16:52:10Z</updated>
<author>
<name>Paolo Bonzini</name>
<email>bonzini@gnu.org</email>
</author>
<published>2009-06-17T14:26:06Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=959e2e64a594e2fb8de2585078e31b07a8da6fc9'/>
<id>urn:sha1:959e2e64a594e2fb8de2585078e31b07a8da6fc9</id>
<content type='text'>
In the old regex

^[ \t]*(([ \t]*[A-Za-z_][A-Za-z_0-9]*){2,}[ \t]*\([^;]*)$
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

you can backtrack arbitrarily from [A-Za-z_0-9]* into [A-Za-z_], thus
causing an exponential number of backtracks.  Ironically it also causes
the regex not to work as intended; for example "catch" can match the
underlined part of the regex, the first repetition matching "c" and
the second matching "atch".

The replacement regex avoids this problem, because it makes sure that
at least a space/tab is eaten on each repetition.  In other words,
a suffix of a repetition can never be a prefix of the next repetition.

Signed-off-by: Paolo Bonzini &lt;bonzini@gnu.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Change the spelling of "wordregex".</title>
<updated>2009-01-22T07:52:16Z</updated>
<author>
<name>Boyd Stephen Smith Jr</name>
<email>bss@iguanasuicide.net</email>
</author>
<published>2009-01-21T04:59:54Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=ae3b970ac3e21324a95fea75213c2569180d74c6'/>
<id>urn:sha1:ae3b970ac3e21324a95fea75213c2569180d74c6</id>
<content type='text'>
Use "wordRegex" for configuration variable names.  Use "word_regex" for C
language tokens.

Signed-off-by: Boyd Stephen Smith Jr. &lt;bss@iguanasuicide.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>color-words: make regex configurable via attributes</title>
<updated>2009-01-17T18:44:21Z</updated>
<author>
<name>Thomas Rast</name>
<email>trast@student.ethz.ch</email>
</author>
<published>2009-01-17T16:29:48Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=80c49c3de2d5a3aa12b0980a65f1163c8aef0c16'/>
<id>urn:sha1:80c49c3de2d5a3aa12b0980a65f1163c8aef0c16</id>
<content type='text'>
Make the --color-words splitting regular expression configurable via
the diff driver's 'wordregex' attribute.  The user can then set the
driver on a file in .gitattributes.  If a regex is given on the
command line, it overrides the driver's setting.

We also provide built-in regexes for the languages that already had
funcname patterns, and add an appropriate diff driver entry for C/++.
(The patterns are designed to run UTF-8 sequences into a single chunk
to make sure they remain readable.)

Signed-off-by: Thomas Rast &lt;trast@student.ethz.ch&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
