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

Re: [PATCH] blame: add --fuzzy-lines command line option

From
Isabella Stephens <istephens@atlassian.com>
Date
Oct 26, 2017, 07:08 UTC
Message-ID
<fab198e6-a736-ff2c-1c37-719b07531942@atlassian.com>
In-Reply-To
<xmqqtvyme8pg.fsf@gitster.mtv.corp.google.com>
On 26/10/17 5:15 pm, Junio C Hamano wrote:
Show 18 quoted lines
> Isabella Stephens <istephens@atlassian.com> writes:
> 
>> If the -L option is used to specify a line range in git blame, and the
>> end of the range is past the end of the file, git will fail with a fatal
>> error. It may instead be desirable to perform a git blame for the line
>> numbers in the intersection of the file and the specified line range.
> 
> Even though erroring out upon such input was done as a deliberate
> design decision, in retrospect, I do not think the design decision
> made much sense.
> 
> The code already takes a nonsense input and tries to make best sense
> of it, e.g. "-L10,6" is interpreted as "-L6,10" instead of erroring
> out.  So if we were to do this kind of change, I suspect that it may
> be better to do so unconditionally without introducing a new option.
> 
> Thanks.
> 

Thanks for following up. I've sent through a version 2 of the patch without the command line option.

Previous: istephens@atlassian.com
Message 27 of 27 in “blame: add --fuzzy-lines command line option”
  1. blame: add --fuzzy-lines command line optionIsabella Stephens, Oct 26, 2017
  2. Junio C HamanoOct 26, 2017
  3. blame: prevent error if range ends past end of fileIsabella Stephens, Oct 26, 2017
  4. Jacob KellerOct 26, 2017
  5. Isabella StephensOct 26, 2017
  6. SZEDER GáborOct 26, 2017
  7. Isabella StephensOct 26, 2017
  8. blame: prevent error if range ends past end of fileIsabella Stephens, Oct 27, 2017
  9. Junio C HamanoOct 27, 2017
  10. Junio C HamanoOct 27, 2017
  11. Isabella StephensOct 27, 2017
  12. Eric SunshineOct 27, 2017
  13. 0/2 blame and log: prevent error if range ends past end of fileistephens@atlassian.com, Apr 26, 2018
  14. 1/2 blame: prevent error if range ends past end of fileistephens@atlassian.com, Apr 26, 2018
  15. Junio C HamanoApr 27, 2018
  16. Isabella StephensApr 27, 2018
  17. Junio C HamanoApr 27, 2018
  18. Isabella StephensApr 27, 2018
  19. Junio C HamanoMay 2, 2018
  20. 0/2 blame and log: prevent error if range ends past end of fileistephens@atlassian.com, May 29, 2018
  21. blame: prevent error if range ends past end of fileistephens@atlassian.com, May 29, 2018
  22. Eric SunshineMay 30, 2018
  23. Isabella StephensMay 31, 2018
  24. log: prevent error if line range ends past end of fileistephens@atlassian.com, May 29, 2018
  25. Eric SunshineMay 30, 2018
  26. 2/2 log: prevent error if line range ends past end of fileistephens@atlassian.com, Apr 26, 2018
  27. Isabella StephensOct 26, 2017

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.