All of lore.kernel.org
 help / color / mirror / Atom feed
From: Charles Bailey <charles@hashpling.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: Wincent Colaiuta <win@wincent.com>, Jeff King <peff@peff.net>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	git@vger.kernel.org
Subject: Re: [PATCH] Re-re-re-fix common tail optimization
Date: Thu, 20 Dec 2007 09:23:15 +0000	[thread overview]
Message-ID: <20071220092315.GA31337@hashpling.org> (raw)
In-Reply-To: <7vy7bqrzat.fsf@gitster.siamese.dyndns.org>

On Wed, Dec 19, 2007 at 04:21:30PM -0800, Junio C Hamano wrote:
> 
> By the way, how does this rewrite look?
> 

It looks good and the test works on my fedora and Mac OS X boxes.
(Just for reference I'm on 10.4.3, not 'Leopard'.)

I've snipped everything except zc that I wanted to comment on.

The only two really minor nits I have is that zc does bizarre things
without warning for more than 9999 "z" ( e.g. 17000 = 9000 + 8000 =
98000 (!) ) and that, from a function responsibility point of view,
the /^index/d looks rather out of place.

Perhaps a comment saying tha zc is designed for <= 9999 z's?  Given
this, a lot of the /g are redundant.

But hey, it's a test script and it works and I don't have any better
suggestions. :)

Charles.

> +zc () {
> +	sed -e "/^index/d" \
> +		-e "s/$z1000/Q/g" \
> +		-e "s/QQQQQQQQQ/Z9000/g" \
> +		-e "s/QQQQQQQQ/Z8000/g" \
> +		-e "s/QQQQQQQ/Z7000/g" \
> +		-e "s/QQQQQQ/Z6000/g" \
> +		-e "s/QQQQQ/Z5000/g" \
> +		-e "s/QQQQ/Z4000/g" \
> +		-e "s/QQQ/Z3000/g" \
> +		-e "s/QQ/Z2000/g" \
> +		-e "s/Q/Z1000/g" \
> +		-e "s/$z100/Q/g" \
> +		-e "s/QQQQQQQQQ/Z900/g" \
> +		-e "s/QQQQQQQQ/Z800/g" \
> +		-e "s/QQQQQQQ/Z700/g" \
> +		-e "s/QQQQQQ/Z600/g" \
> +		-e "s/QQQQQ/Z500/g" \
> +		-e "s/QQQQ/Z400/g" \
> +		-e "s/QQQ/Z300/g" \
> +		-e "s/QQ/Z200/g" \
> +		-e "s/Q/Z100/g" \
> +		-e "s/000Z//g" \
> +		-e "s/$z10/Q/g" \
> +		-e "s/QQQQQQQQQ/Z90/g" \
> +		-e "s/QQQQQQQQ/Z80/g" \
> +		-e "s/QQQQQQQ/Z70/g" \
> +		-e "s/QQQQQQ/Z60/g" \
> +		-e "s/QQQQQ/Z50/g" \
> +		-e "s/QQQQ/Z40/g" \
> +		-e "s/QQQ/Z30/g" \
> +		-e "s/QQ/Z20/g" \
> +		-e "s/Q/Z10/g" \
> +		-e "s/00Z//g" \
> +		-e "s/z/Q/g" \
> +		-e "s/QQQQQQQQQ/Z9/g" \
> +		-e "s/QQQQQQQQ/Z8/g" \
> +		-e "s/QQQQQQQ/Z7/g" \
> +		-e "s/QQQQQQ/Z6/g" \
> +		-e "s/QQQQQ/Z5/g" \
> +		-e "s/QQQQ/Z4/g" \
> +		-e "s/QQQ/Z3/g" \
> +		-e "s/QQ/Z2/g" \
> +		-e "s/Q/Z1/g" \
> +		-e "s/0Z//g" \
> +	;
> +}

  parent reply	other threads:[~2007-12-20  9:24 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
2007-12-20  0:21                       ` Junio C Hamano
2007-12-20  1:38                         ` Wincent Colaiuta
2007-12-20  9:23                         ` Charles Bailey [this message]
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=20071220092315.GA31337@hashpling.org \
    --to=charles@hashpling.org \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=peff@peff.net \
    --cc=torvalds@linux-foundation.org \
    --cc=win@wincent.com \
    /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.