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

Re: [PATCH] blame: allow -L n,m to have an m bigger than the file's line count

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 12, 2010, 00:25 UTC
Message-ID
<7vfx57mhaj.fsf@alter.siamese.dyndns.org>
In-Reply-To
<76718491002101139m4061fb90qcee7d34fca9f242f@mail.gmail.com>
Jay Soffian <jaysoffian@gmail.com> writes:
Show 10 quoted lines
>> Another thing we _might_ want to consider doing is something like:
>>
>>    -L'*/^#ifdef WINDOWS/,/^#endif \/\* WINDOWS \/\*/'
>>
>> to tell it "I don't care to count how many WINDOWS ifdef blocks there are;
>> grab all of them".
>
> That was my aim, but the syntax I'd settled on was to use
> -L/pattern/..END where END is either a numerical argument or another
> pattern. IOW, ".." instead of ",".
I would suggest against using that syntax.

Users of different systems use A,B or A..B as range notations, but there isn't anything that helps the unsuspecting learners to learn and memorize that double-dot variant A..B has a repeating semantics and comma A,B does not.

Previous: Jay Soffian
Message 9 of 9 in “blame: allow -L n,m to have an m bigger than the file's line count”
  1. blame: allow -L n,m to have an m bigger than the file's line countStephen Boyd, Feb 10, 2010
  2. SZEDER GáborFeb 10, 2010
  3. Jay SoffianFeb 10, 2010
  4. Stephen BoydFeb 10, 2010
  5. Junio C HamanoFeb 10, 2010
  6. Jay SoffianFeb 10, 2010
  7. Junio C HamanoFeb 10, 2010
  8. Jay SoffianFeb 10, 2010
  9. Junio C HamanoFeb 12, 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.