Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArjen Laarhoven <arjen@yaph.org>2008-09-07 22:45:37 +0400
committerJunio C Hamano <gitster@pobox.com>2008-09-11 00:36:40 +0400
commit3632cfc2487afc41c7c9e939a9d357daca3e5d67 (patch)
treea0e56de2ab6f56753406c47baf8ec8bd79e91cb5 /t/t4018-diff-funcname.sh
parent971e628384fea14e9c0bf96e1c69b97df6ec540e (diff)
Use compatibility regex library for OSX/Darwin
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 <arjen@yaph.org> Tested-by: Mike Ralphson <mike@abacus.co.uk> (AIX) Tested-by: Johannes Sixt <johannes.sixt@telecom.at> (MinGW) Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4018-diff-funcname.sh')
-rwxr-xr-xt/t4018-diff-funcname.sh6
1 files changed, 6 insertions, 0 deletions
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 833d6cbcfc..18bcd9713d 100755
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -57,4 +57,10 @@ test_expect_success 'last regexp must not be negated' '
test_must_fail git diff --no-index Beer.java Beer-correct.java
'
+test_expect_success 'alternation in pattern' '
+ git config diff.java.funcname "^[ ]*\\(\\(public\\|static\\).*\\)$"
+ git diff --no-index Beer.java Beer-correct.java |
+ grep "^@@.*@@ public static void main("
+'
+
test_done