What's in git.git (Oct 2008, #03; Tue, 14)
Just trying to get my development repository back in sync with what I received from Shawn. Thanks to everybody, I think maint is ready for 1.6.0.3.
* The 'maint' branch has these fixes since the last announcement.
Junio C Hamano (1):
Update draft release notes to 1.6.0.3
* The 'master' branch has these since the last announcement in addition to the above.
Jeff King (1):
tests: shell negation portability fix
Junio C Hamano (1):
Update draft release notes to 1.6.1
Quoted 5 lines · Junio C Hamano
* The 'master' branch has these since the last announcement in addition to the above.
Jeff King (1):
tests: shell negation portability fix
Can you cherry-pick this into maint? The problem it fixes was caused by 969c877, which is in maint (IOW, master is fixed, but maint is still broken).
-Peff
Quoted 11 lines · Jeff King
Quoted 5 lines · Junio C Hamano
* The 'master' branch has these since the last announcement in addition to the above.
Jeff King (1):
tests: shell negation portability fixCan you cherry-pick this into maint? The problem it fixes was caused by 969c877, which is in maint (IOW, master is fixed, but maint is still broken).
Thanks, will do.
Two questions:
1) Should a5a5a048 be in maint?
"xdiff-interface.c: strip newline (and cr) from line before pattern matching"
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?
-brandon
Quoted 8 lines · Brandon Casey
2) Do we want to stick with compat/regex on
Darwin: Arjen
FreeBSD: Jeff
AIX: Mikenow 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
Quoted 4 lines · Jeff King
Quoted 2 lines · Brandon Casey
2) Do we want to stick with compat/regex on
Quoted 8 lines
Quoted 6 lines
Darwin: Arjen
FreeBSD: Jeff
AIX: Mikenow 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
Quoted 1 line · Brandon Casey
Darwin, anyone?
'maint' passes for me on Darwin (OS X Leopard) after removing the regex stuff in Makefile
- Pieter
Quoted 7 lines · Pieter de Bie
Quoted 1 line · Brandon Casey
Darwin, anyone?
'maint' passes for me on Darwin (OS X Leopard) after removing the regex stuff in
Makefile
Yup, confirmed.
Arjen
Signature · 5 lines
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"Quoted 4 lines · Brandon Casey
Two questions:
1) Should
a5a5a048be 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'.
Quoted 8 lines
2) Do we want to stick with compat/regex on
Darwin: Arjen
FreeBSD: Jeff
AIX: Mikenow 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.
A message that is not in the archive (sent off-list or not yet received): [email protected]
PATCH 2/2 t4018-diff-funcname: demonstrate end of line funcname matching flaw
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.
--- t/t4018-diff-funcname.sh | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-)
t/t4018-diff-funcname.sh +6 -0
@@ -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 |
Signature · 1 line
1.6.0.2.101.gb844
PATCH 1/2 t4018-diff-funcname: rework negated last expression test
In reply to Junio C HamanoThis 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.
---
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(-)
t/t4018-diff-funcname.sh +2 -1
@@ -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' '
Signature · 1 line
1.6.0.2.101.gb844
Quoted 10 lines · Junio C Hamano
Quoted 4 lines · Brandon Casey
Two questions:
1) Should
a5a5a048be 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.
Quoted 2 lines
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.
Signature · 1 line
Shawn.
Quoted 5 lines · Shawn O. Pearce
Quoted 2 lines
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.
Quoted 11 lines · Junio C Hamano
Quoted 5 lines · Shawn O. Pearce
Quoted 2 lines
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.
Quoted 2 lines
I just wanted to see if there was any particular reason not to have this on 'maint'.
Nope.
Signature · 1 line
Shawn.
2008/10/15 Brandon Casey <[email protected]>:
Quoted 8 lines
2) Do we want to stick with compat/regex on
Darwin: Arjen
FreeBSD: Jeff
AIX: Mikenow 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:
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
Quoted 8 lines · Brandon Casey
2) Do we want to stick with compat/regex on
Darwin: Arjen
FreeBSD: Jeff
AIX: Mikenow 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.
--- Makefile | 6 ------ 1 files changed, 0 insertions(+), 6 deletions(-)
Makefile +0 -6
@@ -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