git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* Diff Range Underflow
@ 2018-10-07 13:47 Era
  2018-10-12  8:10 ` Johannes Schindelin
  0 siblings, 1 reply; 2+ messages in thread
From: Era @ 2018-10-07 13:47 UTC (permalink / raw)
  To: git

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







^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Diff Range Underflow
  2018-10-07 13:47 Diff Range Underflow Era
@ 2018-10-12  8:10 ` Johannes Schindelin
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Schindelin @ 2018-10-12  8:10 UTC (permalink / raw)
  To: Era; +Cc: git

[-- Attachment #1: Type: text/plain, Size: 1283 bytes --]

Hi Era,

On Sun, 7 Oct 2018, Era wrote:

> 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.

Happily, you can work on reproducing this with a public repository, or
even better: with two crafted files that can be compared via `git diff
--no-index ...` to trigger the bug, starting with the blob contents you
cannot share and editing them down to the minimal size, changing the
contents to no longer contain any sensitive information. Please do so.

Ciao,
Johannes

> 
> 
> Best regards,
> Erik
> 
> 
> 
> 
> 
> 
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2018-10-12  8:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-07 13:47 Diff Range Underflow Era
2018-10-12  8:10 ` Johannes Schindelin

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).