Commit Briefs

4fca09464d Thomas Adam

handle NULL argument to got_diffreg_result_free

ok stsp@


68069cf601 Thomas Adam

portable: fixes for NetBSD

* Move the main incldue/got_compat.h to the top of the files they're included in. * Define SHA256Init and friends to the system equivalents.


98670ba726 Thomas Adam

portable: rework SHA detection

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


4680f70435 Thomas Adam

portable: remove sha1.h; found portably

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


588a8092bc 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>


db97f624e0 Thomas Adam

remove casts which make older gcc versions unhappy

../lib/diffreg.c:44: error: initializer element is not constant ../lib/diffreg.c:51: error: initializer element is not constant ../lib/diffreg.c:59: error: initializer element is not constant ../lib/diffreg.c:66: error: initializer element is not constant reported by Red on Libera IRC, and by sthen@ who pointed out such failures appearing in landry's sparc64 bulk build logs.


7a800a02c4 Thomas Adam

sync file with diff.git 279d77aa1e4b921090e702a6a8a5a94a98a062b1 and

use the faster headers-only mode for diff3


a42e5f4ff9 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


b6b86fd1b9 Thomas Adam

remove trailing whitespace; patch by Josiah Frentsos


82c78e96f1 Thomas Adam

tog: keymaps to jump to next/prev file/hunk in the diff

Add () and {} key maps to navigate to the previous and next file or hunk in the diff. This required changing Got's diff API to collect line type metadata in addition to the line offsets already produced as prompted by stsp. ok stsp@


8b925c6ccd 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.


25ec70067d 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


dd2e2f52c1 Thomas Adam

move more opentemp out of diffreg.c

ok tracey


89fe1c42b3 Thomas Adam

portable: fix-up sha1.h include

-portable doesn't need this directly.


9a267125aa 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@


82f9484cc5 Thomas Adam

portable: include sha1.h portably

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


c17f3d0c7b 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@


b0e25f642d Thomas Adam

portable: freebsd: portably include sha1

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


ec242592d3 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@


dd038bc6ec Thomas Adam

portable: initial Linux compilation

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


56b63ca4ab Stefan Sperling

make fclose(3) failure checks consistent; check 'fclose() == EOF' everywhere

ok millert, naddy





24e87ea363 Stefan Sperling

remove unused function got_diffreg_prepared_files()