<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/t/t4018-diff-funcname.sh, branch v1.6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2009-05-06T05:49:02Z</updated>
<entry>
<title>t4018-diff-funcname: add cpp xfuncname pattern to syntax test</title>
<updated>2009-05-06T05:49:02Z</updated>
<author>
<name>Brandon Casey</name>
<email>drafnel@gmail.com</email>
</author>
<published>2009-05-02T14:31:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=066e596abb2768be1ef3984a55ce39643fbb36e5'/>
<id>urn:sha1:066e596abb2768be1ef3984a55ce39643fbb36e5</id>
<content type='text'>
Signed-off-by: Brandon Casey &lt;drafnel@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2008-10-17T08:52:32Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-10-17T08:52:32Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=46dc1b0e332612aa32c139007fa33f4b429de9d1'/>
<id>urn:sha1:46dc1b0e332612aa32c139007fa33f4b429de9d1</id>
<content type='text'>
* maint:
  t1301-shared-repo.sh: don't let a default ACL interfere with the test
  git-check-attr(1): add output and example sections
  xdiff-interface.c: strip newline (and cr) from line before pattern matching
  t4018-diff-funcname: demonstrate end of line funcname matching flaw
  t4018-diff-funcname: rework negated last expression test
  Typo "does not exists" when git remote update remote.
  remote.c: correct the check for a leading '/' in a remote name
  Add testcase to ensure merging an early part of a branch is done properly

Conflicts:
	t/t7600-merge.sh
</content>
</entry>
<entry>
<title>xdiff-interface.c: strip newline (and cr) from line before pattern matching</title>
<updated>2008-10-16T15:31:56Z</updated>
<author>
<name>Brandon Casey</name>
<email>casey@nrlssc.navy.mil</email>
</author>
<published>2008-10-01T19:28:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=563d5a2c84fb5daf77dd8bfe569e92566a8fd52b'/>
<id>urn:sha1:563d5a2c84fb5daf77dd8bfe569e92566a8fd52b</id>
<content type='text'>
POSIX doth sayeth:

   "In the regular expression processing described in IEEE Std 1003.1-2001,
    the &lt;newline&gt; is regarded as an ordinary character and both a period and
    a non-matching list can match one. ... Those utilities (like grep) that
    do not allow &lt;newline&gt;s to match are responsible for eliminating any
    &lt;newline&gt; from strings before matching against the RE."

Thus far git has not been removing the trailing newline from strings matched
against regular expression patterns. This has the effect that (quoting
Jonathan del Strother) "... a line containing just 'FUNCNAME' (terminated by
a newline) will be matched by the pattern '^(FUNCNAME.$)' but not
'^(FUNCNAME$)'", and more simply not '^FUNCNAME$'.

Signed-off-by: Brandon Casey &lt;casey@nrlssc.navy.mil&gt;
Signed-off-by: Shawn O. Pearce &lt;spearce@spearce.org&gt;
</content>
</entry>
<entry>
<title>t4018-diff-funcname: demonstrate end of line funcname matching flaw</title>
<updated>2008-10-16T15:31:56Z</updated>
<author>
<name>Brandon Casey</name>
<email>drafnel@gmail.com</email>
</author>
<published>2008-10-16T00:58:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b19d288b4d440c76348b519d06a4ed7b62c93611'/>
<id>urn:sha1:b19d288b4d440c76348b519d06a4ed7b62c93611</id>
<content type='text'>
Since the newline is not removed from lines before pattern matching, a
pattern cannot match to the end of the line using the '$' operator without
using an additional operator which will indirectly match the '\n' character.

Introduce a test which should pass, but which does not due to this flaw.

Signed-off-by: Brandon Casey &lt;drafnel@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t4018-diff-funcname: rework negated last expression test</title>
<updated>2008-10-16T15:31:56Z</updated>
<author>
<name>Brandon Casey</name>
<email>drafnel@gmail.com</email>
</author>
<published>2008-10-16T00:58:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=16b26725368f7b80711d9a631029fbb869646f9c'/>
<id>urn:sha1:16b26725368f7b80711d9a631029fbb869646f9c</id>
<content type='text'>
This test used the non-zero exit status of 'git diff' to indicate that a
negated funcname pattern, when placed last, was correctly rejected.

The problem with this is that 'git diff' always returns non-zero if it
finds differences in the files it is comparing, and the files must
contain differences in order to trigger the funcname pattern codepath.

Instead of checking for non-zero exit status, make sure the expected
error message is printed.

Signed-off-by: Brandon Casey &lt;drafnel@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>t4018-diff-funcname: add objective-c xfuncname pattern to syntax test</title>
<updated>2008-10-14T23:49:13Z</updated>
<author>
<name>Brandon Casey</name>
<email>casey@nrlssc.navy.mil</email>
</author>
<published>2008-10-14T20:22:10Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=aef405dd5021f674f86b66cadfe4442b5f79cbfc'/>
<id>urn:sha1:aef405dd5021f674f86b66cadfe4442b5f79cbfc</id>
<content type='text'>
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>t4018-diff-funcname: test syntax of builtin xfuncname patterns</title>
<updated>2008-09-23T08:48:49Z</updated>
<author>
<name>Brandon Casey</name>
<email>casey@nrlssc.navy.mil</email>
</author>
<published>2008-09-22T23:26:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=fdac6692a0b0eda293f9f1bf4bc49b05b29f3c45'/>
<id>urn:sha1:fdac6692a0b0eda293f9f1bf4bc49b05b29f3c45</id>
<content type='text'>
[jc: fixes bibtex pattern breakage exposed by this test]

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>t4018-diff-funcname: test syntax of builtin xfuncname patterns</title>
<updated>2008-09-23T02:59:23Z</updated>
<author>
<name>Brandon Casey</name>
<email>casey@nrlssc.navy.mil</email>
</author>
<published>2008-09-22T23:19:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e3bf5e43fd9db9391ebc876ef118dbb431853d69'/>
<id>urn:sha1:e3bf5e43fd9db9391ebc876ef118dbb431853d69</id>
<content type='text'>
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>diff.*.xfuncname which uses "extended" regex's for hunk header selection</title>
<updated>2008-09-19T03:06:31Z</updated>
<author>
<name>Brandon Casey</name>
<email>casey@nrlssc.navy.mil</email>
</author>
<published>2008-09-18T22:44:33Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=45d9414fa5599b41578625961b53e18a9b9148c7'/>
<id>urn:sha1:45d9414fa5599b41578625961b53e18a9b9148c7</id>
<content type='text'>
Currently, the hunk headers produced by 'diff -p' are customizable by
setting the diff.*.funcname option in the config file. The 'funcname' option
takes a basic regular expression. This functionality was designed using the
GNU regex library which, by default, allows using backslashed versions of
some extended regular expression operators, even in Basic Regular Expression
mode. For example, the following characters, when backslashed, are
interpreted according to the extended regular expression rules: ?, +, and |.
As such, the builtin funcname patterns were created using some extended
regular expression operators.

Other platforms which adhere more strictly to the POSIX spec do not
interpret the backslashed extended RE operators in Basic Regular Expression
mode. This causes the pattern matching for the builtin funcname patterns to
fail on those platforms.

Introduce a new option 'xfuncname' which uses extended regular expressions,
and advertise it _instead_ of funcname. Since most users are on GNU
platforms, the majority of funcname patterns are created and tested there.
Advertising only xfuncname should help to avoid the creation of non-portable
patterns which work with GNU regex but not elsewhere.

Additionally, the extended regular expressions may be less ugly and
complicated compared to the basic RE since many common special operators do
not need to be backslashed.

For example, the GNU Basic RE:

    ^[ 	]*\\(\\(public\\|static\\).*\\)$

becomes the following Extended RE:

    ^[ 	]*((public|static).*)$

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>Use compatibility regex library for OSX/Darwin</title>
<updated>2008-09-10T20:36:40Z</updated>
<author>
<name>Arjen Laarhoven</name>
<email>arjen@yaph.org</email>
</author>
<published>2008-09-07T18:45:37Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3632cfc2487afc41c7c9e939a9d357daca3e5d67'/>
<id>urn:sha1:3632cfc2487afc41c7c9e939a9d357daca3e5d67</id>
<content type='text'>
The standard libc regex library on OSX does not support alternation
in POSIX Basic Regular Expression mode.  This breaks the diff.funcname
functionality on OSX.

To fix this, we use the GNU regex library which is already present in
the compat/ diretory for the MinGW port.  However, simply adding compat/
to the COMPAT_CFLAGS variable causes a conflict between the system
fnmatch.h and the one present in compat/.  To remedy this, move the
regex and fnmatch functionality to their own subdirectories in compat/
so they can be included seperately.

Signed-off-by: Arjen Laarhoven &lt;arjen@yaph.org&gt;
Tested-by: Mike Ralphson &lt;mike@abacus.co.uk&gt; (AIX)
Tested-by: Johannes Sixt &lt;johannes.sixt@telecom.at&gt; (MinGW)
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
