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

Re: [PATCH 1/8] Refactor parse_loc

From
Junio C Hamano <gitster@pobox.com>
Date
Dec 14, 2010, 23:20 UTC
Message-ID
<7vr5dkq6vf.fsf@alter.siamese.dyndns.org>
In-Reply-To
<201012150006.12462.trast@student.ethz.ch>
Thomas Rast <trast@student.ethz.ch> writes:
Show 23 quoted lines
> Junio C Hamano wrote:
>> Thomas Rast <trast@student.ethz.ch> writes:
>> > +test_expect_success 'blame -L parses end' '
>> > +	git blame -L1,1 tres >out &&
>> > +	cat out &&
>> > +	test $(wc -l < out) -eq 1
>> > +'
>> 
>> What does this test exactly?  "end"?
>
> That's the test I was referring to in the commit message:
>
>   The new test is for a case that made me pause during debugging: the
>   'blame -L with invalid end' test was the only one that noticed an
>   outright failure to parse the end *at all*.  So make a more explicit
>   test for that.
>
> So I guess a more thorough test title would be
>
>   blame -L parses <end> part of its argument
>
> IOW, the test verifies that -L1,1 is not parsed the same as -L1, which
> would result in *two* lines of output.

Oh the comment definitely was misleading. It made me think that "-L1,1" was a typo of "-L1,$" which was the new feature in the patch.

Previous: Thomas RastNext: Thomas Rast
Message 5 of 13 in “git log -L, cleaned up and (hopefully) fixed”
  1. 0/8 git log -L, cleaned up and (hopefully) fixedThomas Rast, Dec 14, 2010
  2. 1/8 Refactor parse_locThomas Rast, Dec 14, 2010
  3. Junio C HamanoDec 14, 2010
  4. Thomas RastDec 14, 2010
  5. Junio C HamanoDec 14, 2010
  6. 2/8 Export three functions from diff.cThomas Rast, Dec 14, 2010
  7. Junio C HamanoDec 14, 2010
  8. 3/8 Export rewrite_parents() for 'log -L'Thomas Rast, Dec 14, 2010
  9. 4/8 Implement line-history search (git log -L)Thomas Rast, Dec 14, 2010
  10. 5/8 log -L: support parent rewritingThomas Rast, Dec 14, 2010
  11. 6/8 log -L: add --graph prefix before outputThomas Rast, Dec 14, 2010
  12. 7/8 log -L: add --full-line-diff optionThomas Rast, Dec 14, 2010
  13. 8/8 log -L: implement move/copy detection (-M/-C)Thomas Rast, Dec 14, 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.