Repository navigation
Conversation
-d ran diff -u on two temporary files and replaced their names with the file's path, so each header still carried diff's timestamp. GNU diff prints it as "2026-10-31 18:49:17.123456789 +0000" and BSD diff, the one macOS ships, as "2026-10-31 18:49:17", which made flag_diff.txt fail on macOS, and the timestamp of a temporary file says nothing about the source. diff now labels both sides with the path (-L, which GNU and BSD diff both support), as gofmt -d does, so the headers are the same everywhere.
thesyncim
force-pushed
the
diff-labels
branch
from
November 1, 2026 13:36
ca47d57 to
a687925
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
flag_diff.txtfails on macOS. The-dheaders carrydiff's timestamp, and BSD diff prints it differently from GNU diff (no fractional seconds, no zone). It's the timestamp of a temp file anyway, so it doesn't tell the reader anything.This passes
-L pathfor both sides (GNU, BSD and busybox diff all have it), so the headers are just--- path/+++ pathlikegofmt -d, and the filename replacement goes away. The four diff scripts now expect the path alone.It's one of three small fixes to get the suite passing on macOS, along with #8 and #9, which I needed while trying loopvec on goav1.