Re: Possible bug: identical lines added/removed in git diff

2018-08-29 Thread Gabriel Holodak
I did have some possibly interfering settings in my .gitconfig
previously. I removed everything, so all the commands I'll describe
were run with an empty config.

On Mon, Aug 27, 2018 at 1:47 PM Stefan Beller  wrote:
> I suspected you might have a different diff algorithm configured,
> so I tested
> git diff --no-index old new
> git diff --patience --no-index old new
> git diff --histogram --no-index old new
>
> all of which do not reproduce the issue.

I don't believe I had any settings to change the algorithm. Using any
of --minimal, --patience, or --histogram seems to fix the issue. It
still occurs with --diff-algorithm=default. I also tried
--no-indent-heuristic, which had no effect.

> Are there any encoding issues locally (Which platform
> are you on?) or in transit (Could you re-download the files
> from [1] and confirm it still produces this bug?)
>
> [1] 
> https://public-inbox.org/git/CAE6=wb_4_phjfqpubfcyknkejfdr22s-y0npqkw5yd4gvan...@mail.gmail.com/

I should have mentioned before, this is on Arch Linux. I can reproduce
from the downloaded files. I can also reproduce on macOS 10.13.6, with
git 2.18.0.

> Could you cut down to a real minimal reproduction, i.e. just these 20
> lines or so?

I'm working on getting down to a minimal reproduction, a few lines at
a time. One thing that seems strange: as I've removed lines, there are
a bunch of lines that don't matter. Then I'll find some lines that, if
removed, completely fix the issue. But the ordering for these
apparently important lines doesn't matter. They just have to be
somewhere in the file to cause the duplicated diffs.

I'll upload again when I've figured out all the unimportant lines to remove.

> Do you have any smudge filters or configuration regarding
> line endings?

No filters, I did have core.autocrlf = input. But as I mentioned, I
can also reproduce with an empty config.

> Are the lines really different or the same ? (Can you inspect with a
> hex editor, maybe there are different kinds of invisible white spaces?)

Yep, the lines in question are identical.

Thanks for looking into this.
Gabriel


Possible bug: identical lines added/removed in git diff

2018-08-26 Thread Gabriel Holodak
I think I'm running into a bug with git diff on v2.18.0. When I diff
the attached files, part of the diff ends up looking like:
...
 STARTCHAR U+00F0
 ENCODING 240
 SWIDTH 500 0
-DWIDTH 8 0
-BBX 7 12 1 0
-BITMAP
-12
-0C
-14
-22
-02
-3E
-42
-42
-82
-84
-84
-78
+DWIDTH 8 0
+BBX 8 12 0 0
+BITMAP
+1B
+0E
+1E
+33
+03
+3F
+63
+63
+C3
+C6
+C6
+7C
 ENDCHAR
 STARTCHAR U+00F1
...
where the "DWIDTH 8 0" and "BITMAP" lines are removed and added,
despite being identical. It only seems to be happening around this
section of the file, for the U+00F0 character. This also seems close
to a minimal reproduction of the issue. If I git add --patch and stage
a few hunks, then the duplicated lines seem to disappear.

Steps to reproduce:
git diff --no-index unitera_bold_italic.bdf.old unitera_bold_italic.bdf.new
(It also happens inside a repo, this just seemed the easiest way to
demonstrate.)

Gabriel Holodak


unitera_bold_italic.bdf.new
Description: Binary data


unitera_bold_italic.bdf.old
Description: application/trash