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

Re: [PATCH 0/2] line-log: small fixes

From
SZEDER Gábor <szeder.dev@gmail.com>
Date
Aug 18, 2025, 11:25 UTC
Message-ID
<aKMNuxb3Q95RHok1@szeder.dev>
In-Reply-To
<20250818111310.1283932-1-szeder.dev@gmail.com>
On Mon, Aug 18, 2025 at 01:13:08PM +0200, SZEDER Gábor wrote:
Show 31 quoted lines
> On Thu, May 02, 2024 at 09:29:04PM +0300, Evgeni Chasnovski wrote:
> > Calling `git log` with several `-L` flags can result in an error.
> > 
> > Steps to reproduce (on Linux):
> > - Set up repo with a history:
> >     - `mkdir log-line-assert`
> >     - `cd log-line-assert`
> >     - `git init`
> >     - `echo "Line 1\nLine 2" > file`
> >     - `git add .`
> >     - `git commit -m 'Commit 1'`
> >     - `echo "Line 3\nLine 4\nLine 5" >> file`
> >     - `git add .`
> >     - `git commit -m 'Commit 2'`
> > - Execute the following command: `git log -L2,2:file -L4,4:file`
> > 
> > # What did you expect to happen? (Expected behavior)
> > 
> > Show log with evolution of lines 2 and 4.
> > 
> > # What happened instead? (Actual behavior)
> > 
> > An error with the following text:
> > 
> > ```
> > git: line-log.c:73: range_set_append: Assertion `rs->nr == 0 ||
> > rs->ranges[rs->nr-1].end <= a' failed.
> > zsh: IOT instruction (core dumped)  git log -L2,2:file -L4,4:file
> > ```
> 
> Thanks for reporting this issue!
The original bug report is at:
  https://public-inbox.org/git/CAP9Eqm1PsYBdjoVKgomJZe79_ZCOAtP4p7uvprUOerdjrcUjmQ@mail.gmail.com/

It's been quite a while since I last sent a patch to the list, and apparently my send-email skills became somewhat rusty...

Previous: SZEDER Gábor
Message 5 of 5 in “line-log: small fixes”
  1. 0/2 line-log: small fixesSZEDER Gábor, Aug 18, 2025
  2. 1/2 line-log: fix assertion errorSZEDER Gábor, Aug 18, 2025
  3. Junio C HamanoAug 18, 2025
  4. 2/2 line-log: show all line ranges touched by the same diff rangeSZEDER Gábor, Aug 18, 2025
  5. SZEDER GáborAug 18, 2025

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.