OpenBSD CVS

CVS log for src/usr.bin/diff3/diff3prog.c


[BACK] Up to [local] / src / usr.bin / diff3

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_6_8


Revision 1.20 / (download) - annotate - [select for diffs], Fri Jun 26 07:28:47 2020 UTC (3 years, 11 months ago) by stsp
Branch: MAIN
CVS Tags: OPENBSD_6_8_BASE, OPENBSD_6_8
Changes since 1.19: +9 -2 lines
Diff to previous 1.19 (colored)

Fix merging of files that lack newlines for diff(3), OpenRCS, and OpenCVS.

Merges with a file that lacks newlines (\n) were triggering a fatal error.
This could be easily reproduced with merge(1) and diff3(1):
$ echo foo > foo
$ echo bar > bar
$ echo -n baz > baz
$ merge -p foo bar baz
merge: failed to merge
$ diff3 -E foo bar baz
1a
=======
diff3prog: logic error
$

Fix this by properly handling short reads from the third file argument.
Only the third file argument triggered the problem. The other input
files were already handled correctly.

ok millert@

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.