Re: What's in git.git (Oct 2008, #03; Tue, 14)

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: What's in git.git (Oct 2008, #03; Tue, 14)

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:45:29

Brandon Casey [off-list ref] 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.

Re: What's in git.git (Oct 2008, #03; Tue, 14)

From: Shawn O. Pearce <hidden>
Date: 2016-06-15 22:45:29

Junio C Hamano [off-list ref] wrote:
Brandon Casey [off-list ref] writes:
quoted
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.

[PATCH maint 1/2] t4018-diff-funcname: rework negated last expression test

From: <hidden>
Date: 2016-06-15 22:45:29

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 <redacted>
---


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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help