All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Haggerty <mhagger@alum.mit.edu>
To: Junio C Hamano <gitster@pobox.com>
Cc: Thomas Rast <trast@inf.ethz.ch>,
	Eric Sunshine <sunshine@sunshineco.com>,
	Git List <git@vger.kernel.org>
Subject: Re: [PATCH/RFC] blame: accept multiple -L ranges
Date: Tue, 09 Jul 2013 21:57:43 +0200	[thread overview]
Message-ID: <51DC6B37.9030108@alum.mit.edu> (raw)
In-Reply-To: <7vppurv8bl.fsf@alter.siamese.dyndns.org>

On 07/09/2013 09:31 PM, Junio C Hamano wrote:
> Thomas Rast <trast@inf.ethz.ch> writes:
> 
>> If you define it that way, the output of
>>
>>   git blame -L 4,6; git blame -L /A/,+20
>>
>> is significantly different from
>>
>>   git blame -L 4,6 -L /A/,+20
>>
>> Not just in the presentation or any possible coalescing, but in the
>> meaning of the ranges.
>>
>> Do you really want to make it that way?
> 
> Absolutely.  The primary reason I want to be able to specify two
> ranges at the same time is to follow two functions in a file that
> appear in separate places, and /A/ might not be unique.  When I want
> to say "I want to see from here to there, and then from here to
> there, and then from here to there", it would be very frustrating if
> "and then" resets what I mean by "here" every time and make these
> three evaluated independently.

It would be more general to support "follow the second match to /A/"
*independent* of whether the first match is also followed.  I think your
proposal only allows the second to be followed if the first is also
followed.  Therefore it seems to me that your wish is to add a
side-effect to one feature so that you can use it to obtain a simulacrum
of a second feature, instead of building the second feature directly.

Perhaps allow <start> and <end> to be a sequence of forms like

/A//A/,+20

    Start at the second occurrence of /A/ an continue for 20 lines

/A/+20,/B/

    Start 20 lines after the first match of /A/ until the subsequent
match of /B/

E.g., the body of function "foo" would be '/^int foo//^{/+1,/^}/-1'.
That should provide hours of amusement to baffled users ;-)

Michael

-- 
Michael Haggerty
mhagger@alum.mit.edu
http://softwareswirl.blogspot.com/

  reply	other threads:[~2013-07-09 19:57 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-07  8:45 [PATCH/RFC] blame: accept multiple -L ranges Eric Sunshine
2013-07-07  9:58 ` Junio C Hamano
2013-07-09 15:04   ` Eric Sunshine
2013-07-09 16:39     ` Junio C Hamano
2013-07-09 17:17       ` Eric Sunshine
2013-07-09 17:42       ` Thomas Rast
2013-07-09 18:23         ` Eric Sunshine
2013-07-09 18:55           ` Junio C Hamano
2013-07-09 19:07             ` Eric Sunshine
2013-07-09 19:12             ` Thomas Rast
2013-07-09 19:21               ` Jonathan Nieder
2013-07-09 19:31               ` Junio C Hamano
2013-07-09 19:57                 ` Michael Haggerty [this message]
2013-07-09 20:25                   ` Junio C Hamano
2013-07-22  8:12                     ` Eric Sunshine
2013-07-22 10:39                       ` Thomas Rast
2013-07-22 17:23                         ` Junio C Hamano
2013-07-22 19:19                           ` Thomas Rast
2013-07-22 21:34                             ` Junio C Hamano
2013-07-10  9:18                 ` Thomas Rast
2013-07-11 16:44                   ` Junio C Hamano
2013-07-09 18:57         ` 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=51DC6B37.9030108@alum.mit.edu \
    --to=mhagger@alum.mit.edu \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sunshine@sunshineco.com \
    --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.