Page MenuHomeFreeBSD

diff3: fix diff3 -A
ClosedPublic

Authored by bapt on Feb 13 2026, 8:49 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Apr 4, 4:50 PM
Unknown Object (File)
Thu, Mar 19, 9:07 PM
Unknown Object (File)
Mon, Mar 9, 6:17 PM
Unknown Object (File)
Mar 2 2026, 6:18 PM
Unknown Object (File)
Mar 2 2026, 3:30 AM
Unknown Object (File)
Mar 1 2026, 10:23 AM
Unknown Object (File)
Mar 1 2026, 5:33 AM
Unknown Object (File)
Feb 28 2026, 7:45 AM
Subscribers

Details

Summary

for cases where file2 differs but file1 and file3 agrees, the code
stored the file2 and file3 line numbers in the de[] editing script
entries but used them as if they were file1 line numbers.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bapt requested review of this revision.Feb 13 2026, 8:49 AM

This looks ok, but I will have to admit that diff3 was always a bit of a mystery box. Please update the comment, but assuming tests don't start failing I'm willing to bet this is an improvement.

usr.bin/diff3/diff3.c
884

This comment is out of date now.

This revision is now accepted and ready to land.Feb 13 2026, 9:12 AM
This revision was automatically updated to reflect the committed changes.