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

[PATCH v4 0/2] blame and log: prevent error if range ends past end of file

From
istephens@atlassian.com <istephens@atlassian.com>
Date
Apr 26, 2018, 07:45 UTC
Message-ID
<20180426074502.78318-1-istephens@atlassian.com>
In-Reply-To
<CAPig+cSH-y7ChDE_LW55M_wB=KhD7uJHXX=OvZ=1ri5KfYQ5Sg@mail.gmail.com>

Picking this back up after a little while. This solution means we can still accept -L, for an empty file but any other range will fail. I've made the change for both blame and log (as two separate patches).

I've also changed behaviour in a couple of corner cases - before we couldn't distinguish between -Ln,-(n+1) and -Ln, so -Ln,-(n+1) would blame from n to the end of the file rather than the first n lines. Also, we now complain that -L,-n is an empty range where previously this would blame the whole file.

Previous: Eric SunshineNext: istephens@atlassian.com
Message 13 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.