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

Re: [PATCH v7 2/5] blame: introduce $ as "end of file" in -L syntax

From
Junio C Hamano <gitster@pobox.com>
Date
Jun 7, 2012, 17:23 UTC
Message-ID
<7vwr3jhw8z.fsf@alter.siamese.dyndns.org>
In-Reply-To
<d9e1235303c949849b9acfa37fc9e9a780d93873.1339063659.git.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
> To save the user a lookup of the last line number, introduce $ as a
> shorthand for the last line.  This is mostly useful to spell "until
> the end of the file" as '-L<begin>,$'.

Hmph. This is mostly useful not to error out when user (perhaps mistakenly) expects that the end of file is spelled as "$"; both "git blame -L<begin>" and "git blame L<begin>," have always meant "til the end", IIRC.

Because I do not offhand think of other & better uses of "$" as a special case that conflicts with "the end of file", I do not think it is a bad patch that needs to be rejected, though.

Previous: Thomas RastNext: Thomas Rast
Message 4 of 18 in “git log -L, all new and shiny”
  1. 0/5 git log -L, all new and shinyThomas Rast, Jun 7, 2012
  2. 1/5 Refactor parse_locThomas Rast, Jun 7, 2012
  3. 2/5 blame: introduce $ as "end of file" in -L syntaxThomas Rast, Jun 7, 2012
  4. Junio C HamanoJun 7, 2012
  5. Thomas RastJun 7, 2012
  6. 3/5 Export three functions from diff.cThomas Rast, Jun 7, 2012
  7. Junio C HamanoJun 7, 2012
  8. 4/5 Export rewrite_parents() for 'log -L'Thomas Rast, Jun 7, 2012
  9. 5/5 Implement line-history search (git log -L)Thomas Rast, Jun 7, 2012
  10. Junio C HamanoJun 7, 2012
  11. Thomas RastJun 7, 2012
  12. Zbigniew Jędrzejewski-SzmekJun 10, 2012
  13. Junio C HamanoJun 15, 2012
  14. Thomas RastJun 15, 2012
  15. Junio C HamanoJun 15, 2012
  16. Junio C HamanoJun 16, 2012
  17. Thomas RastJun 19, 2012
  18. Junio C HamanoJun 19, 2012

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.