Commit Briefs
portable: rework SHA detection
Simply the SHA detection by not predicating on libcrypto, but instead checking individual header files.
portable: remove sha1.h; found portably
Remove sha1.h as this is found portably across systems.
rename lib/sha1.c to lib/hash.c
It will soon grow functions to deal with sha256 too. stsp@ agrees.
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>
unbreak send.sh regress from recent ref-delta changes
fix argument order typo in flags passed to got_pack_create()
gotadmin pack: add a -D flag to force using ref-delta
Intended mostly for the regress suite, so we'll be able to test also the ref-delta code paths. ok stsp@
got: minor refactor of got_pathlist_free() API
Accept flag parameter to optionally specify which pointers to free. This saves callers looping through the list to free pointers. ok + fix stsp@
got send: show server error
Print the error message reported by the remote server when failing to update a branch (for e.g. because of a server-side check.) Reported by gonzalo@, with help and ok stsp@.
let callers of got_pack_create() configure rate-limiting of progress reporting
Needed by future gotd(8), where progress reports will be sent to a network socket, rather than a local terminal.
move got_opentempfd() call out of got_pack_create()
Future gotd(8) needs to run got_pack_create() in a chroot environment, so we can no longer open new temporary files inside got_pack_create(). ok op@
make got_pack_create() write to a file descriptor instead of a stdio FILE
The old code required a seekable output file. This conflicts with requirements of future gotd(8), which will write pack file data to network sockets. ok op@
Correctly track if we sent more data since the last time we looked.
With the narrow scope of bytes_sent_cur it would always be zero, and we would always update progress. Found by llvm's scan-build (Dead store). OK stsp
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.
portable: make UUID includes generic
Move the detection of UUID header files to be included portably. This will have no functional effect until MacOS detection is put in place.
portable: tree/queue header fixes
sys/{tree,queue}.h are looked up via configure, and therefore are included via that mechanism.
fix regression where 'got send -T' failed if same tag already exists on server
Problem reported and fix tested by Omar Polo.
portable: update to handle bloom, etc
Update portable to support changes for bloom, etc.
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.
move duplicated dial_ssh() and dial_git() functions into a common file
These functions are used by 'got send' and 'got fetch' in order to open network connections to a server. Move them into new file lib/dial.c and declare relevant functions in got_dial.h and lib/got_lib_dial.h. No functional change.