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

Diff Range Underflow

From
EEra <aigner.erik@gmail.com>
Date
Oct 7, 2018, 13:47 UTC
Message-ID
<ED62D6B5-9227-4FC9-AB77-7DB4D3835501@gmail.com>

I discovered an apparent underflow when using the —unified=0 / -U0 flag with git-show on a merge commit. Leaving the flag on its default value or 1 shows the ranges correctly.

	$git --no-pager show -z --no-color --pretty=%x00%s%x00%b%x00 -U1 3ac9cfed9ce01836dea1fee96c4eceb2df4b6878
produces a diff with the following ranges
	@@@ -582,2 -599,19 +582,1 @@@ extension TranslationContentViewControl
changing the flag to -U0 like so
	git --no-pager show -z --no-color --pretty=%x00%s%x00%b%x00 -U0 3ac9cfed9ce01836dea1fee96c4eceb2df4b6878
results in the following ranges begin output
	@@@ -583,0 -600,17 +583,18446744073709551615 @@@ extension TranslationContentViewControl

Obviously this is some sort of underflow bug. Unfortunately I cant share the original repo or diff.

Best regards, Erik

Next: Johannes Schindelin
Message 1 of 2 in “Diff Range Underflow”
  1. EraOct 7, 2018
  2. Johannes SchindelinOct 12, 2018

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.