Commits


use Myers diff instead of Patience diff when merging files with diff3 Myers diff tends to divide files into smaller diff chunks, while Patience diff attemps to maximize the size of diff chunks. Smaller diffs chunks generally result in a more managable presentation of merge conflicts.


make fclose(3) failure checks consistent; check 'fclose() == EOF' everywhere ok millert, naddy


use size_t for loop indices to avoid signedness warnings; from emaste@freebsd


consistently label removed files as "/dev/null" in diff headers


handle binary files in got/tog diff commands; add -a options to force text


merge new diff implementation from the git.gameoftrees.org diff.git repository This new diff implementation was started by Neels Hofmeyr during the u2k20 hackathon and now replaces diffreg.c code lifted from the OpenBSD base system. The integration of this code into Got was done by me. Got now uses the patience diff algorithm by default. The diff.git repository will remain the primary repository for the diff code, which already compiles and runs on other operating systems such as Linux. Any fixes and improvements for files inherited from the diff.git repository should be written against that repository and synced to got.git afterwards.


fix merging with files that do not contain a newline character; ok millert@


make tmp dir location a compile-time setting and change gotweb's tmp dir We are not sure whether a gotweb package can own /var/www/tmp on OpenBSD. Moving gotweb's tmp dir to /var/www/got/tmp sidesteps that issue.


fix build on sparc64 (uninitialized variable)


show base commit hash and omit filenames in conflict markers


show original file content in conflict markers


improve use of mixed size_t/off_t types in diff3.c's edscript()


diff3.c: do not use the same variables for both line numbers and byte offsets


diff3.c's skip() returns number of bytes skipped so switch from int to size_t


remove worklist code; it was only used to unlink files which we already unlink