* Re: What's in git.git (Oct 2008, #03; Tue, 14)
2008-10-15 15:35 ` Brandon Casey
@ 2008-10-15 17:25 ` Mike Ralphson
2008-10-15 19:38 ` Junio C Hamano
` (2 subsequent siblings)
3 siblings, 0 replies; 16+ messages in thread
From: Mike Ralphson @ 2008-10-15 17:25 UTC (permalink / raw)
To: Brandon Casey
Cc: Junio C Hamano, git, Arjen Laarhoven, Jeff King, Shawn O. Pearce
2008/10/15 Brandon Casey <casey@nrlssc.navy.mil>:
> 2) Do we want to stick with compat/regex on
>
> Darwin: Arjen
> FreeBSD: Jeff
> AIX: Mike
>
> now that the builtin funcname patterns have been converted to Extended
> Regular Expressions?
Thanks for the reminder, I'd been meaning to recheck this. It appears
that AIX doesn't require compat/regex now with the eregexes, so:
Tested-as-no-longer-required-by: Mike Ralphson <mike@abacus.co.uk>
Though I've just noticed my test counts don't actually add up...
fixed 1
success 3555
failed 0
broken 1
total 3559
8-)
Mike
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: What's in git.git (Oct 2008, #03; Tue, 14)
2008-10-15 15:35 ` Brandon Casey
2008-10-15 17:25 ` Mike Ralphson
@ 2008-10-15 19:38 ` Junio C Hamano
2008-10-15 20:20 ` Shawn O. Pearce
` (2 more replies)
2008-10-16 10:08 ` What's in git.git (Oct 2008, #03; Tue, 14) Jeff King
2008-10-24 2:44 ` Junio C Hamano
3 siblings, 3 replies; 16+ messages in thread
From: Junio C Hamano @ 2008-10-15 19:38 UTC (permalink / raw)
To: Brandon Casey
Cc: git, Arjen Laarhoven, Jeff King, Shawn O. Pearce, Mike Ralphson
Brandon Casey <casey@nrlssc.navy.mil> writes:
> Two questions:
>
> 1) Should a5a5a048 be in maint?
> "xdiff-interface.c: strip newline (and cr) from line before pattern matching"
I would have forked a maint-fix topic to prepare a merge of this fix to
both 'maint' and 'master' but apparently this was applied directly on
'master'. I may be missing a valid reason why Shawn did it this way.
If we can add a test case to demonstrate the existing breakage, I think we
can (and should) cherry-pick it to 'maint'.
> 2) Do we want to stick with compat/regex on
>
> Darwin: Arjen
> FreeBSD: Jeff
> AIX: Mike
>
> now that the builtin funcname patterns have been converted to Extended
> Regular Expressions?
Mike already said AIX does not need to, and I expect others would say
their native regexp library can grok ERE just fine. Let's wait for others
to confirm and then remove the compat/regex thing.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: What's in git.git (Oct 2008, #03; Tue, 14)
2008-10-15 19:38 ` Junio C Hamano
@ 2008-10-15 20:20 ` Shawn O. Pearce
2008-10-15 20:26 ` Junio C Hamano
2008-10-16 0:58 ` [PATCH maint 1/2] t4018-diff-funcname: rework negated last expression test drafnel
[not found] ` <1224118730-24711-1-git-send-email-drafnel@gmail.com>
2 siblings, 1 reply; 16+ messages in thread
From: Shawn O. Pearce @ 2008-10-15 20:20 UTC (permalink / raw)
To: Junio C Hamano
Cc: Brandon Casey, git, Arjen Laarhoven, Jeff King, Mike Ralphson
Junio C Hamano <gitster@pobox.com> wrote:
> Brandon Casey <casey@nrlssc.navy.mil> writes:
>
> > Two questions:
> >
> > 1) Should a5a5a048 be in maint?
> > "xdiff-interface.c: strip newline (and cr) from line before pattern matching"
>
> I would have forked a maint-fix topic to prepare a merge of this fix to
> both 'maint' and 'master' but apparently this was applied directly on
> 'master'. I may be missing a valid reason why Shawn did it this way.
My fault. I didn't have a reason for putting it on master.
My reason really boiled down to "I can't decide where this goes,
oops, got distracted by something, git checkout master, git am,
move on...".
Yes, it probably should have gone to maint. No, it didn't go there.
Temporary lapse in maintainer judgement.
> If we can add a test case to demonstrate the existing breakage, I think we
> can (and should) cherry-pick it to 'maint'.
Probably. Sorry for the cherry-pick being required here.
--
Shawn.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: What's in git.git (Oct 2008, #03; Tue, 14)
2008-10-15 20:20 ` Shawn O. Pearce
@ 2008-10-15 20:26 ` Junio C Hamano
2008-10-15 20:36 ` Shawn O. Pearce
0 siblings, 1 reply; 16+ messages in thread
From: Junio C Hamano @ 2008-10-15 20:26 UTC (permalink / raw)
To: Shawn O. Pearce
Cc: Brandon Casey, git, Arjen Laarhoven, Jeff King, Mike Ralphson
"Shawn O. Pearce" <spearce@spearce.org> writes:
>> If we can add a test case to demonstrate the existing breakage, I think we
>> can (and should) cherry-pick it to 'maint'.
>
> Yes, it probably should have gone to maint. No, it didn't go there.
> Temporary lapse in maintainer judgement.
That is Ok. I do the same all the time (and I try to rewind and rebuild
when I spot it before pushing the results out, but I am not always
successful).
I just wanted to see if there was any particular reason not to have this
on 'maint'.
Thanks.
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: What's in git.git (Oct 2008, #03; Tue, 14)
2008-10-15 20:26 ` Junio C Hamano
@ 2008-10-15 20:36 ` Shawn O. Pearce
0 siblings, 0 replies; 16+ messages in thread
From: Shawn O. Pearce @ 2008-10-15 20:36 UTC (permalink / raw)
To: Junio C Hamano
Cc: Brandon Casey, git, Arjen Laarhoven, Jeff King, Mike Ralphson
Junio C Hamano <gitster@pobox.com> wrote:
> "Shawn O. Pearce" <spearce@spearce.org> writes:
>
> >> If we can add a test case to demonstrate the existing breakage, I think we
> >> can (and should) cherry-pick it to 'maint'.
> >
> > Yes, it probably should have gone to maint. No, it didn't go there.
> > Temporary lapse in maintainer judgement.
>
> That is Ok. I do the same all the time (and I try to rewind and rebuild
> when I spot it before pushing the results out, but I am not always
> successful).
Oh, trust me, I had many times where I had to rebuild everything
for that day's push because I forgot about a patch that should
be in maint. At least your Meta/RB and Meta/PU scripts make it
somewhat painless, that and Git's ability to just hard reset a
branch back to what I last published. ;-)
I just utterly failed to do it that morning. Or at least failed
to do it for this change.
> I just wanted to see if there was any particular reason not to have this
> on 'maint'.
Nope.
--
Shawn.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH maint 1/2] t4018-diff-funcname: rework negated last expression test
2008-10-15 19:38 ` Junio C Hamano
2008-10-15 20:20 ` Shawn O. Pearce
@ 2008-10-16 0:58 ` drafnel
[not found] ` <1224118730-24711-1-git-send-email-drafnel@gmail.com>
2 siblings, 0 replies; 16+ messages in thread
From: drafnel @ 2008-10-16 0:58 UTC (permalink / raw)
To: gitster; +Cc: git, Brandon Casey
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 <drafnel@gmail.com>
---
This is not really a series, but I expect you'll apply both, so this
seems easier for both of us.
-brandon
t/t4018-diff-funcname.sh | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 99fff97..72076ec 100755
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -65,7 +65,8 @@ test_expect_success 'custom pattern' '
test_expect_success 'last regexp must not be negated' '
git config diff.java.funcname "!static" &&
- test_must_fail git diff --no-index Beer.java Beer-correct.java
+ git diff --no-index Beer.java Beer-correct.java 2>&1 |
+ grep "fatal: Last expression must not be negated:"
'
test_expect_success 'alternation in pattern' '
--
1.6.0.2.101.gb844
^ permalink raw reply related [flat|nested] 16+ messages in thread
[parent not found: <1224118730-24711-1-git-send-email-drafnel@gmail.com>]
* [PATCH maint 2/2] t4018-diff-funcname: demonstrate end of line funcname matching flaw
[not found] ` <1224118730-24711-1-git-send-email-drafnel@gmail.com>
@ 2008-10-16 0:58 ` drafnel
0 siblings, 0 replies; 16+ messages in thread
From: drafnel @ 2008-10-16 0:58 UTC (permalink / raw)
To: gitster; +Cc: git, Brandon Casey
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 <drafnel@gmail.com>
---
t/t4018-diff-funcname.sh | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/t/t4018-diff-funcname.sh b/t/t4018-diff-funcname.sh
index 72076ec..40a805a 100755
--- a/t/t4018-diff-funcname.sh
+++ b/t/t4018-diff-funcname.sh
@@ -69,6 +69,12 @@ test_expect_success 'last regexp must not be negated' '
grep "fatal: Last expression must not be negated:"
'
+test_expect_failure 'pattern which matches to end of line' '
+ git config diff.java.funcname "Beer$" &&
+ git diff --no-index Beer.java Beer-correct.java |
+ grep "^@@.*@@ Beer"
+'
+
test_expect_success 'alternation in pattern' '
git config diff.java.xfuncname "^[ ]*((public|static).*)$" &&
git diff --no-index Beer.java Beer-correct.java |
--
1.6.0.2.101.gb844
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: What's in git.git (Oct 2008, #03; Tue, 14)
2008-10-15 15:35 ` Brandon Casey
2008-10-15 17:25 ` Mike Ralphson
2008-10-15 19:38 ` Junio C Hamano
@ 2008-10-16 10:08 ` Jeff King
2008-10-16 15:21 ` Brandon Casey
2008-10-24 2:44 ` Junio C Hamano
3 siblings, 1 reply; 16+ messages in thread
From: Jeff King @ 2008-10-16 10:08 UTC (permalink / raw)
To: Brandon Casey
Cc: Junio C Hamano, git, Arjen Laarhoven, Shawn O. Pearce,
Mike Ralphson
On Wed, Oct 15, 2008 at 10:35:30AM -0500, Brandon Casey wrote:
> 2) Do we want to stick with compat/regex on
>
> Darwin: Arjen
> FreeBSD: Jeff
> AIX: Mike
>
> now that the builtin funcname patterns have been converted to Extended
> Regular Expressions?
t4018 passes without compat/regex on FreeBSD. Is that a sufficient test?
-Peff
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: What's in git.git (Oct 2008, #03; Tue, 14)
2008-10-16 10:08 ` What's in git.git (Oct 2008, #03; Tue, 14) Jeff King
@ 2008-10-16 15:21 ` Brandon Casey
2008-10-16 15:37 ` Pieter de Bie
0 siblings, 1 reply; 16+ messages in thread
From: Brandon Casey @ 2008-10-16 15:21 UTC (permalink / raw)
To: Jeff King
Cc: Junio C Hamano, git, Arjen Laarhoven, Shawn O. Pearce,
Mike Ralphson
Jeff King wrote:
> On Wed, Oct 15, 2008 at 10:35:30AM -0500, Brandon Casey wrote:
>
>> 2) Do we want to stick with compat/regex on
>>
>> Darwin: Arjen
>> FreeBSD: Jeff
>> AIX: Mike
>>
>> now that the builtin funcname patterns have been converted to Extended
>> Regular Expressions?
>
> t4018 passes without compat/regex on FreeBSD. Is that a sufficient test?
I think so. t4018 makes sure all the patterns compile, and includes Arjen's test
for appropriate handling of the alternation operator.
Darwin, anyone?
-brandon
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: What's in git.git (Oct 2008, #03; Tue, 14)
2008-10-16 15:21 ` Brandon Casey
@ 2008-10-16 15:37 ` Pieter de Bie
2008-10-17 7:02 ` Arjen Laarhoven
0 siblings, 1 reply; 16+ messages in thread
From: Pieter de Bie @ 2008-10-16 15:37 UTC (permalink / raw)
To: Brandon Casey
Cc: Jeff King, Junio C Hamano, git, Arjen Laarhoven, Shawn O. Pearce,
Mike Ralphson
On 16 okt 2008, at 17:21, Brandon Casey wrote:
> Darwin, anyone?
'maint' passes for me on Darwin (OS X Leopard) after removing the
regex stuff in Makefile
- Pieter
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: What's in git.git (Oct 2008, #03; Tue, 14)
2008-10-16 15:37 ` Pieter de Bie
@ 2008-10-17 7:02 ` Arjen Laarhoven
0 siblings, 0 replies; 16+ messages in thread
From: Arjen Laarhoven @ 2008-10-17 7:02 UTC (permalink / raw)
To: Pieter de Bie
Cc: Brandon Casey, Jeff King, Junio C Hamano, git, Shawn O. Pearce,
Mike Ralphson
On Thu, Oct 16, 2008 at 05:37:10PM +0200, Pieter de Bie wrote:
>
> On 16 okt 2008, at 17:21, Brandon Casey wrote:
>
> >Darwin, anyone?
>
> 'maint' passes for me on Darwin (OS X Leopard) after removing the
> regex stuff in Makefile
Yup, confirmed.
Arjen
--
Arjen Laarhoven
The presence of those seeking the truth is infinitely to be preferred to
those who think they've found it.
-- Terry Pratchett, "Monstrous Regiment"
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: What's in git.git (Oct 2008, #03; Tue, 14)
2008-10-15 15:35 ` Brandon Casey
` (2 preceding siblings ...)
2008-10-16 10:08 ` What's in git.git (Oct 2008, #03; Tue, 14) Jeff King
@ 2008-10-24 2:44 ` Junio C Hamano
3 siblings, 0 replies; 16+ messages in thread
From: Junio C Hamano @ 2008-10-24 2:44 UTC (permalink / raw)
To: Brandon Casey
Cc: git, Arjen Laarhoven, Jeff King, Shawn O. Pearce, Mike Ralphson
Brandon Casey <casey@nrlssc.navy.mil> writes:
> 2) Do we want to stick with compat/regex on
>
> Darwin: Arjen
> FreeBSD: Jeff
> AIX: Mike
>
> now that the builtin funcname patterns have been converted to Extended
> Regular Expressions?
-- >8 --
Subject: Stop using compat/regex.c on platforms with working regexp library
We used to have non-POSIX comformant BRE in our code, and linked with GNU
regexp library on a few platforms (Darwin, FreeBSD and AIX) to work it
around. This was backwards.
We've fixed the broken regexps to use ERE that native regexp libraries on
these platforms can handle just fine. There is no need to link with GNU
regexp library on these platforms anymore.
Tested-on-AIX-by: Mike Ralphson <mike@abacus.co.uk>
Tested-on-FreeBSD-by: Jeff King <peff@peff.net>
Tested-on-Darwin-by: Arjen Laarhoven <arjen@yaph.org>
Tested-on-Darwin-by: Pieter de Bie <pieter@frim.nl>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
Makefile | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git c/Makefile w/Makefile
index d6f3695..40309e1 100644
--- c/Makefile
+++ w/Makefile
@@ -640,8 +640,6 @@ ifeq ($(uname_S),Darwin)
endif
NO_STRLCPY = YesPlease
NO_MEMMEM = YesPlease
- COMPAT_CFLAGS += -Icompat/regex
- COMPAT_OBJS += compat/regex/regex.o
endif
ifeq ($(uname_S),SunOS)
NEEDS_SOCKET = YesPlease
@@ -692,8 +690,6 @@ ifeq ($(uname_S),FreeBSD)
BASIC_LDFLAGS += -L/usr/local/lib
DIR_HAS_BSD_GROUP_SEMANTICS = YesPlease
THREADED_DELTA_SEARCH = YesPlease
- COMPAT_CFLAGS += -Icompat/regex
- COMPAT_OBJS += compat/regex/regex.o
endif
ifeq ($(uname_S),OpenBSD)
NO_STRCASESTR = YesPlease
@@ -720,8 +716,6 @@ ifeq ($(uname_S),AIX)
INTERNAL_QSORT = UnfortunatelyYes
NEEDS_LIBICONV=YesPlease
BASIC_CFLAGS += -D_LARGE_FILES
- COMPAT_CFLAGS += -Icompat/regex
- COMPAT_OBJS += compat/regex/regex.o
endif
ifeq ($(uname_S),GNU)
# GNU/Hurd
^ permalink raw reply related [flat|nested] 16+ messages in thread