Commits


switch 'tog diff' and 'tog blame' to Myers diff for speed Make the choice of diff algorithm configurable by diff API users. The got and gotweb programs keep using Patience diffs which are prettier than Myers. But tog should be as fast as possible since it is being used interactively. If performance of Patience diff gets improved later we can consider switching tog back over to it. ok tracey jamsek


move more opentemp out of diffreg.c ok tracey


move got_opentempfd() out of lib/diff.c again ok tracey


move got_opentempfd out of open_blob. ok stsp@


build with -Wwrite-strings Throwing this into the mix for a while, we can always get rid of it again if it becomes annoying. No objections from stsp@


always show commit or tree IDs in diff header, in order to help 'got patch' The idea is that got patch can simply look for a line such as: commit - abcde1234567... to find the merge base commit ID to show in diff3 conflict markers. got log -p now displays commit IDs in its diff header, instead ofl tree or blob IDs. ok op@


reuse a temporary file across commits during got log -p -S suggested by + ok op@


move creation of tempfiles outside of lib/diff.c ok tracey


sort paths in got log -Pp and tog's diff view the same way as in the diff reported by and fix confirmed by naddy


implement 'got diff -c' for diffing commits with optional filtering by path Need for filtering by path sugggested by kn@ ok naddy@


portable: add FreeBSD support This adds the capability to compile got-portable on FreeBSD.


portable: initial Linux compilation This commit modifies the GoT main branch to be able to compile it under linux.


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


do not forget to add an offset for line zero in diff_blobs() Fixes a problem in 'tog diff' where the first line of the output was cut off.


prevent potential fclose(NULL) in error path of diff_blobs()


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


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


remove stdbool.h where it's not needed


fix type of filesize output parameter of got_object_blob_dump_to_file()


remove unused function got_diff_blob_prepared_file()


simply got_diff_prepare_file() by letting callers worry about file creation


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.


add support for symlinks in the repository to 'got diff'


show a list of paths changed in a commit with 'got log -P', and in tog requested by matthieu@


convert tree entries from SIMPLEQ to an array