Commits


rename got_commit_graph_iter_start() to got_commit_graph_bfsort() This function begins a breadth-first traversal. The new name makes it easier to distinguish from got_commit_graph_toposort().


include sha2.h too where sha1.h is included In preparation for wide sha256 support; stsp@ agrees. Change done mechanically with find . -iname \*.[cy] -exec sam {} + X ,x/<sha1\.h>/i/\n#include <sha2.h>


make got_commit_graph_iter_next use caller-provided storage for the id and adjust the callers. discussed with and ok stsp@


plug leak in the commit graph iterator We fail to release the memory for the nodes. To fix it however, we some consumer of the commit graph iterator need to be corrected: the returned pointer is safe to be used only up until the next iter_next call; save a copy it if it's needed afterwards too. ok stsp@


remove trailing whitespace; patch by Josiah Frentsos


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 remaining got_opentemp's out of blame. ok op@


move got_opentempfd out of blame_open ok stsp@ jrick@


move got_opentempfd out of open_blob. ok stsp@


inline struct got_object_id in struct got_object_qid Saves us from doing a malloc/free call for every item on the list. ok op@


pass an already open commit object to the blame callback ok op@


stop relying on commit cache for good performance of got_object_id_by_path() Instead of internally opening and closing the same commit object over and over again, require callers to pass an open commit object in. Avoids an inherent dependency on the commit object cache for reasonable performance. ok op@


remove unused variables to fix LLVM 13 warnings; ok stsp


switch from SIMPLEQ to equivalent STAILQ macros The singly-linked tail queue macros were added to OpenBSD 6.9 and are more widely available on other systems. ok stsp


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


fix a typo that triggered "munmap: Invalid argument" in got blame on FreeBSD ok stsp


remove redundant lines of code from close_file2_and_reuse_file1()


handle binary files in blame's custom file diff atomizer


implement custom atomizer for blame to reuse data and mappings across commits


remove stdbool.h where it's not needed


fix type of filesize output parameter of got_object_blob_dump_to_file()


allow for configuring a custom file atomizer with got_diff_get_config()


new blame algorithm which compares commit N-1 to N; with help from Neels


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.


indentation fixes