From: Charles Bailey <charles@hashpling.org>
To: Jeff King <peff@peff.net>
Cc: Junio C Hamano <gitster@pobox.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
git@vger.kernel.org
Subject: Re: [PATCH] Re-re-re-fix common tail optimization
Date: Wed, 19 Dec 2007 14:37:12 +0000 [thread overview]
Message-ID: <20071219143712.GA3483@hashpling.org> (raw)
In-Reply-To: <20071219142715.GB14187@coredump.intra.peff.net>
On Wed, Dec 19, 2007 at 09:27:15AM -0500, Jeff King wrote:
> On Wed, Dec 19, 2007 at 02:18:45PM +0000, Charles Bailey wrote:
>
> > Just to add to the woe on this one, this test breaks on MacOS X due to
> > the pattern length limitations of the default sed on that platform.
> >
> > Interested in a patch?
>
> Somebody beat you to it. :) Can you confirm that the fix in
>
> <1198007158-27576-1-git-send-email-win@wincent.com>
>
> works for you?
>
> -Peff
Ooh, the excitement, I've never had the opportunity to "git am"
before.
Yes, I can confirm. It works for me.
For reference I had the following, which is fewer lines but not
inherently better in any other way.
Charles.
diff --git a/t/t4024-diff-optimize-common.sh b/t/t4024-diff-optimize-common.sh
index 20fe87b..ffb2c8f 100755
--- a/t/t4024-diff-optimize-common.sh
+++ b/t/t4024-diff-optimize-common.sh
@@ -7,8 +7,9 @@ test_description='common tail optimization'
z=zzzzzzzz ;# 8
z="$z$z$z$z$z$z$z$z" ;# 64
z="$z$z$z$z$z$z$z$z" ;# 512
-z="$z$z$z$z" ;# 2048
-z2047=$(expr "$z" : '.\(.*\)') ; #2047
+z="$z$z" ;# 1024
+z1023=$(expr "$z" : '.\(.*\)') ; #1023
+z2047=$z$z1023
test_expect_success setup '
@@ -35,8 +36,8 @@ diff --git a/file-a b/file-a
--- a/file-a
+++ b/file-a
@@ -1 +1 @@
--aZ
-+AZ
+-aZZz
++AZZz
diff --git a/file-b b/file-b
--- a/file-b
+++ b/file-b
@@ -47,9 +48,9 @@ diff --git a/file-c b/file-c
--- a/file-c
+++ b/file-c
@@ -1 +1 @@
--cZ
+-cZZz
\ No newline at end of file
-+CZ
++CZZz
\ No newline at end of file
diff --git a/file-d b/file-d
--- a/file-d
@@ -61,7 +62,7 @@ EOF
test_expect_success 'diff -U0' '
- git diff -U0 | sed -e "/^index/d" -e "s/$z2047/Z/g" >actual &&
+ git diff -U0 | sed -e "/^index/d" -e "s/$z1023/Z/g" >actual &&
diff -u expect actual
'
--
1.5.3.7.11.ga3d7
next prev parent reply other threads:[~2007-12-19 14:38 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-15 11:16 trim_common_tail bug? Jeff King
2007-12-15 15:51 ` Jeff King
2007-12-15 17:49 ` Junio C Hamano
2007-12-15 20:02 ` Jeff King
2007-12-16 7:06 ` Jeff King
2007-12-16 19:43 ` Junio C Hamano
2007-12-16 21:16 ` Junio C Hamano
2007-12-16 21:21 ` Jeff King
2007-12-16 21:49 ` [PATCH] Re-re-re-fix common tail optimization Junio C Hamano
2007-12-16 22:15 ` Jeff King
2007-12-16 22:23 ` Junio C Hamano
2007-12-16 22:28 ` Junio C Hamano
2007-12-16 22:29 ` Jeff King
2007-12-17 8:42 ` Wincent Colaiuta
2007-12-17 10:39 ` Johannes Schindelin
2007-12-17 10:59 ` Wincent Colaiuta
2007-12-17 11:57 ` Johannes Schindelin
2007-12-17 12:08 ` Wincent Colaiuta
2007-12-17 12:12 ` Jeff King
2007-12-17 12:20 ` Johannes Sixt
2007-12-17 12:51 ` Johannes Schindelin
2007-12-17 17:58 ` Junio C Hamano
2007-12-17 18:05 ` Johannes Schindelin
2007-12-19 14:18 ` Charles Bailey
2007-12-19 14:27 ` Jeff King
2007-12-19 14:37 ` Charles Bailey [this message]
2007-12-20 0:21 ` Junio C Hamano
2007-12-20 1:38 ` Wincent Colaiuta
2007-12-20 9:23 ` Charles Bailey
2007-12-20 9:40 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071219143712.GA3483@hashpling.org \
--to=charles@hashpling.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=peff@peff.net \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.