Label thumbnails by the keys that pick them; never diff binary #8
Loading…
Reference in a new issue
No description provided.
Delete branch "image-labels-and-binary-diff"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Two problems you spotted on the real screen, both fixed:
1. Thumbnail labels contradicted the options line
A single copy was labelled
[a]- but for one conflict the options line says2: Keep conflictand no letter key does anything. The labels now name the keys that pick each copy:original|conflict(matching1: Keep original 2: Keep conflict)original|[a]|[b](matchingab: Pick conflict)And copies with identical bytes share one thumbnail with their labels combined -
original, [a]- since they are the same picture and need no second column. The original always appears; a copy identical to it joins its column rather than duplicating it.2. Binary bytes were diffed as text
Expanding a BMP conflict rendered escape soup across the screen: BMP bytes are valid UTF-8 (with NULs), so the text diff tried anyway. Binary content - NUL bytes or non-UTF-8 - now gets no text diff at all, and stays metadata-only like the file-type table says.
Pinned by fixtures
image/identical- identical pair expands to one thumbnail labelledoriginal, conflictimage/identical_among_three(new) -[a]byte-identical to the original shares its column (original, [a]),[b]stays aloneimage/corrupt_png,image/dimensions,image/narrow_six_cols- single-copy labels nowconflict(with the narrow one cut tocon)image/bmp_stays_plain- expanded BMP shows no diff garbage and no image treatment; the two identical fixture JPEGs also got their 8-bit SOF precision fix so their dimensions parse (they had the same 12-bit header as the earlier ones)Checked
-D warnings.main, as CI will: 12 mutants tested, 11 caught, 1 unviable, 0 missed.original, [a]shares one red thumbnail,[b]sits alone in its column.