git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] blame: add a range option to -L

From
Junio C Hamano <gitster@pobox.com>
Date
May 2, 2010, 15:23 UTC
Message-ID
<7vvdb6uy2w.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20100502091433.GA1854@progeny.tock>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 8 quoted lines
> Bill Pemberton wrote:
>
>> In addition to + and - you can now use r to specify how many lines
>> around <start> that you want to see.  For example: -L 20,r5 would show
>> lines 15 through 25
>
>>From too much exposure to subversion, the r suggests “revision”.
> But ± is too hard to type, so I guess r will have to do.

I am not interested in this patch very much myself, and after thinking about it, I think my dislike largely comes from this syntax, and not from the feature itself. Any non-punctuation letter there looks like a sore thumb. Either "-L 20±5" or even "-L 20+/-5" would have looked a _lot_ saner.

Show 8 quoted lines
>> +++ b/Documentation/blame-options.txt
>> @@ -32,6 +32,12 @@ This is only valid for <end> and will specify a number
>>  of lines before or after the line given by <start>.
>>  +
>>  
>> +- rrange
>
> Maybe -rradius?  “range” sounds like an interval with specified endpoints.

Yes, radius sounds more sensible. Another alternative would be to call it "context", as in "grep -C <n>".

Previous: Michael WittenNext: Bill Pemberton
Message 4 of 6 in “blame: add a range option to -L”
  1. blame: add a range option to -LBill Pemberton, Apr 30, 2010
  2. Jonathan NiederMay 2, 2010
  3. Michael WittenMay 2, 2010
  4. Junio C HamanoMay 2, 2010
  5. Bill PembertonMay 3, 2010
  6. Bill PembertonMay 3, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.