git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Eric Sunshine <sunshine@sunshineco.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Michael Haggerty <mhagger@alum.mit.edu>,
	Thomas Rast <trast@inf.ethz.ch>, Git List <git@vger.kernel.org>
Subject: Re: [PATCH/RFC] blame: accept multiple -L ranges
Date: Mon, 22 Jul 2013 04:12:50 -0400	[thread overview]
Message-ID: <CAPig+cTh2t_Rc13U_F-prmm=sjs2OEHX5AX2DbC5DH+Tx_E5jg@mail.gmail.com> (raw)
In-Reply-To: <7vli5fv5ud.fsf@alter.siamese.dyndns.org>

On Tue, Jul 9, 2013 at 4:25 PM, Junio C Hamano <gitster@pobox.com> wrote:
> Michael Haggerty <mhagger@alum.mit.edu> writes:
>
>> 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
>
> Remember "A" is just a placeholder and in real life it would be more
> than one character.  It is just as annoying as hell you have to type
> it again.
>
> I am not saying that a mode that resets the "start searching from
> here" pointer to the beginning of the file is useless.  For example,
> I would not mind typing a special character, e.g.
>
>     -L <begin1>,<end1> -L !<begin2>,<end2>
>
> that resets the search pointer to the beginning, for a rare case
> where I want the search for <begin2> to restart at the top.
>
> But the thing is, the default matters.  And it is far more common,
> at least to me, when I want to say "from here to there, and then
> from here to there", to expect the second "from here" would be below
> the first one I already specified, while I am looking at the current
> state of a single file from top to bottom and notice two places I am
> interested in.

The proposal currently is only for "-L /RE/,whatever" to behave in a
relative fashion, beginning the search at the end of the last range
specified via -L (or line 1 if there is no previous -L).

Would it also make sense to support "-L +N,whatever" as relative to
the end of the last range specified via -L (or 1 if none).

I ask because the implementation changes needed to also support "-L
+N,whatever" appear to be less invasive than those only allowing "-L
/RE/,whatever/" to be relative. On the other hand, supporting "-L
+N,whatever" requires more documentation. I don't necessarily consider
less invasive changes as a good reason to support "-L +N,whatever" but
it got me thinking about it.

  reply	other threads:[~2013-07-22  8:13 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
2013-07-09 20:25                   ` Junio C Hamano
2013-07-22  8:12                     ` Eric Sunshine [this message]
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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAPig+cTh2t_Rc13U_F-prmm=sjs2OEHX5AX2DbC5DH+Tx_E5jg@mail.gmail.com' \
    --to=sunshine@sunshineco.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=mhagger@alum.mit.edu \
    --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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).