{"thread":{"id":"49503","subject":"Diff Range Underflow","startedAt":"2018-10-07T13:47:27Z","lastAt":"2018-10-12T08:11:02Z","messageCount":2,"participants":["Era","Johannes Schindelin"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"359791","messageId":"ED62D6B5-9227-4FC9-AB77-7DB4D3835501@gmail.com","threadId":"49503","inReplyTo":null,"subject":"Diff Range Underflow","fromName":"Era","fromEmail":"aigner.erik@gmail.com","sentAt":"2018-10-07T13:47:22Z","receivedAt":"2018-10-07T13:47:27Z","isPatch":false,"sender":{"key":"aigner.erik@gmail.com","avatar":null},"body":"I discovered an apparent underflow when using the —unified=0 / -U0 flag with git-show on a merge commit.\nLeaving the flag on its default value or 1 shows the ranges correctly.\n\n\t$git --no-pager show -z --no-color --pretty=%x00%s%x00%b%x00 -U1 3ac9cfed9ce01836dea1fee96c4eceb2df4b6878\n\nproduces a diff with the following ranges\n\n\t@@@ -582,2 -599,19 +582,1 @@@ extension TranslationContentViewControl\n\nchanging the flag to -U0 like so\n\n\tgit --no-pager show -z --no-color --pretty=%x00%s%x00%b%x00 -U0 3ac9cfed9ce01836dea1fee96c4eceb2df4b6878\n\nresults in the following ranges begin output\n\n\t@@@ -583,0 -600,17 +583,18446744073709551615 @@@ extension TranslationContentViewControl\n\n\nObviously this is some sort of underflow bug.\nUnfortunately I cant share the original repo or diff.\n\n\nBest regards,\nErik\n\n\n\n\n\n\n"},{"id":"360282","messageId":"nycvar.QRO.7.76.6.1810121009060.45@tvgsbejvaqbjf.bet","threadId":"49503","inReplyTo":"ED62D6B5-9227-4FC9-AB77-7DB4D3835501@gmail.com","subject":"Re: Diff Range Underflow","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2018-10-12T08:10:58Z","receivedAt":"2018-10-12T08:11:02Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi Era,\n\nOn Sun, 7 Oct 2018, Era wrote:\n\n> I discovered an apparent underflow when using the —unified=0 / -U0 flag with git-show on a merge commit.\n> Leaving the flag on its default value or 1 shows the ranges correctly.\n> \n> \t$git --no-pager show -z --no-color --pretty=%x00%s%x00%b%x00 -U1 3ac9cfed9ce01836dea1fee96c4eceb2df4b6878\n> \n> produces a diff with the following ranges\n> \n> \t@@@ -582,2 -599,19 +582,1 @@@ extension TranslationContentViewControl\n> \n> changing the flag to -U0 like so\n> \n> \tgit --no-pager show -z --no-color --pretty=%x00%s%x00%b%x00 -U0 3ac9cfed9ce01836dea1fee96c4eceb2df4b6878\n> \n> results in the following ranges begin output\n> \n> \t@@@ -583,0 -600,17 +583,18446744073709551615 @@@ extension TranslationContentViewControl\n> \n> \n> Obviously this is some sort of underflow bug.\n> Unfortunately I cant share the original repo or diff.\n\nHappily, you can work on reproducing this with a public repository, or\neven better: with two crafted files that can be compared via `git diff\n--no-index ...` to trigger the bug, starting with the blob contents you\ncannot share and editing them down to the minimal size, changing the\ncontents to no longer contain any sensitive information. Please do so.\n\nCiao,\nJohannes\n\n> \n> \n> Best regards,\n> Erik\n> \n> \n> \n> \n> \n> \n> "}]}