Commit Briefs

Thomas Adam

consistently use ten Xs in mkstemp(3) templates

patch from Josiah Frentsos, thanks!


Thomas Adam

portable: configure: split out dependencies

Rather than assume all dependencies are required for all programs, split them out. This will make packaging easier, as well as splitting the code to use subprojects. Note that due to the use of config.h semantics, in most cases the got_compat.h header file is now at the top of the .c file it is included in, so that it can handle the system header inclusion properly.


Thomas Adam

add missed `size' initialization for use with getline(3)

ok tb@


Thomas Adam

portable: rework SHA detection

Simply the SHA detection by not predicating on libcrypto, but instead checking individual header files.


Thomas Adam

portable: remove sha1.h; found portably

Remove sha1.h as this is found portably across systems.


Thomas Adam

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>


Thomas Adam

use mkstemps(3) instead of mkstemp(3) for opening named temporary files

Allows 'got commit' to use a ".diff" suffix for temporary diff files. ok op@


Thomas Adam

switch diff output mode from "edscript" to "plain" for diff3

getchange() in diff3.c takes any line that starts with an integer and treats it as a hunk header. It doesn't actually require ed script instructions, and traditional ed script diff output would break it. Thus, changing Got's diff3 to rely on plain diff output mode paves the way for implementing traditional ed-script style output in diff.git. Patch by Tom Jones


Thomas Adam

portable: add back sys/queue.h

Now that the handling of including sys/queue.h is better, there's no need to remove those lines from the source. Copy the location of those original sys/queue.h lines from upstream at the same line number, so as to avoid any conflicts in the future.


Thomas Adam

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


Thomas Adam

portable: fix-up sha1.h include

-portable doesn't need this directly.


Thomas Adam

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@


Thomas Adam

portable: include sha1.h portably

Don't directly include sha1.h as this isn't always in the same location across systems.


Thomas Adam

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@


Thomas Adam

portable: freebsd: portably include sha1

The SHA implementation is found portably across systems, so don't include sha1.h directly.


Thomas Adam

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@


Thomas Adam

wrap overlong lines


Thomas Adam

add "e" (close-on-exec) flag to fopen(3) calls

suggested by millert ok thomas_adam





Thomas Adam

fix another segfault in edscript()

Same problem as fixed in 90de04bc7f1b85b9c491bcd124f6178fad005de1. ok stsp


Thomas Adam

fix a segfault in edscript() introduced by my previous commit

Found by our cherrypick regression tests.


Thomas Adam

fix merging of files which contain a dot on a line by itself

Annoying bug which we inherited from OpenRCS which inherited it from OpenBSD's diff3 program. ok tracey millert


Thomas Adam

portable: initial Linux compilation

This commit modifies the GoT main branch to be able to compile it under linux.