OpenBSD CVS

CVS log for src/usr.bin/patch/patch.c


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

Request diff between arbitrary revisions


Default branch: MAIN
Current tag: OPENBSD_7_2


Revision 1.71 / (download) - annotate - [select for diffs], Wed Aug 3 07:30:37 2022 UTC (22 months ago) by op
Branch: MAIN
CVS Tags: OPENBSD_7_3_BASE, OPENBSD_7_3, OPENBSD_7_2_BASE, OPENBSD_7_2
Changes since 1.70: +3 -1 lines
Diff to previous 1.70 (colored)

fix locate_hunk in empty files

if `first_guess' is zero then main() assumes that locate_hunk has failed
and aborts the patch operation.  Instead, make sure to return 1 (the
line number) so that the patch operation can continue.

Issue originally found by Neels Hofmeyr in the regress suite of the diff
implementation for got, where the tests assume that applying a diff with
`patch' and then again with `patch -R' yields back the original file.

ok stsp@

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.