All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Eric Sunshine <sunshine@sunshineco.com>
Cc: "SZEDER Gábor" <szeder@ira.uka.de>,
	"Git List" <git@vger.kernel.org>,
	"Thomas Rast" <trast@inf.ethz.ch>,
	"Bo Yang" <struggleyb.nku@gmail.com>
Subject: Re: [PATCH 2/5] t4211: demonstrate empty -L range crash
Date: Wed, 24 Jul 2013 08:10:48 -0700	[thread overview]
Message-ID: <7vbo5s6ljb.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <CAPig+cTPcFJ_kfQ7zveE-Uf-itRRw2O99vQ61Or0QHvkKnxc_g@mail.gmail.com> (Eric Sunshine's message of "Tue, 23 Jul 2013 19:15:24 -0400")

Eric Sunshine <sunshine@sunshineco.com> writes:

> On Tue, Jul 23, 2013 at 3:03 PM, Junio C Hamano <gitster@pobox.com> wrote:
>> SZEDER Gábor <szeder@ira.uka.de> writes:
>>> You could avoid the 'cat' here and patch in 4/5 by doing $(wc -l <b.c).
>> Correct.
>
> Thanks, I like that better.
>
> Unfortunately, what actually got queued on 'next', after applying this
> fix-up and re-ordering the patch series, is slightly bogus.

The lesson is that one should not rebase while waiting for a flight
in a hurry X-<.

Will queue the following on top.

Thanks for spotting; really appreciated.

-- >8 --
Subject: t4211: fix incorrect rebase at f8395edc (range-set: satisfy non-empty ranges invariant)

Wnen I rewrote "cat b.c | wc -l" into "wc -l <b.c" to squash in a
suggestion on the list to this series, I screwed up subsequent
rebase.  Fix it up.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 t/t4211-line-log.sh | 1 -
 1 file changed, 1 deletion(-)

diff --git a/t/t4211-line-log.sh b/t/t4211-line-log.sh
index 00a850d..7665d67 100755
--- a/t/t4211-line-log.sh
+++ b/t/t4211-line-log.sh
@@ -68,7 +68,6 @@ test_bad_opts "-L :foo:b.c" "no match"
 # thus to demonstrate this particular bug, the empty -L range must follow a
 # non-empty -L range.
 test_expect_success '-L {empty-range} (any -L)' '
-	n=$(expr $(cat b.c | wc -l) + 1) &&
 	n=$(expr $(wc -l <b.c) + 1) &&
 	git log -L1,1:b.c -L$n:b.c
 '
-- 
1.8.3.4-1049-g22454dd

  reply	other threads:[~2013-07-24 15:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-23 14:28 [PATCH 0/5] range-set and line-log bug fixes Eric Sunshine
2013-07-23 14:28 ` [PATCH 1/5] range-set: fix sort_and_merge_range_set() corner case bug Eric Sunshine
2013-07-23 14:28 ` [PATCH 2/5] t4211: demonstrate empty -L range crash Eric Sunshine
2013-07-23 17:59   ` SZEDER Gábor
2013-07-23 19:03     ` Junio C Hamano
2013-07-23 19:59       ` SZEDER Gábor
2013-07-23 23:15       ` Eric Sunshine
2013-07-24 15:10         ` Junio C Hamano [this message]
2013-07-24 20:18           ` Eric Sunshine
2013-07-23 14:28 ` [PATCH 3/5] range-set: satisfy non-empty ranges invariant Eric Sunshine
2013-07-23 14:28 ` [PATCH 4/5] t4211: demonstrate crash when first -L encountered is empty range Eric Sunshine
2013-07-23 14:28 ` [PATCH 5/5] line-log: fix "log -LN" crash when N is last line of file Eric Sunshine
2013-07-23 15:16 ` [PATCH 0/5] range-set and line-log bug fixes Thomas Rast
2013-07-25  8:03 ` Eric Sunshine
2013-07-25  8:09   ` Eric Sunshine
2013-07-25  9:12   ` Johannes Sixt
2013-07-25 13:09     ` Eric Sunshine

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=7vbo5s6ljb.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@vger.kernel.org \
    --cc=struggleyb.nku@gmail.com \
    --cc=sunshine@sunshineco.com \
    --cc=szeder@ira.uka.de \
    --cc=trast@inf.ethz.ch \
    /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.