Commits


rename sha1.c to hash.c


include sha2.h where sha1.h was included


gotd: implement the delete-refs capability Allow clients to run "got send -d" against gotd. Clients will send a zero-id as new id for a reference and, in the special but more common case of just deleting and not updating, no pack file will be sent. ok and tweaks by stsp@


delete trailing whitespaces


make read errors in gotsh serve_write() fatal, as was done for serve_read()


gotsh: validate with parse_command before connecting Export parse_command (now got_serve_parse_command) from lib/serve.c and use it to validate the command line in gotsh instead of just checking that the -c argument starts with 'git-receive-pack' or 'git-upload-pack'. Invalid usage now always fails before opening the socket, while before it wasn't always the case. This also means that invalid usage doesn't count towards the limits. ok jamsek, stsp


fmt; fold long line


make read errors in gotsh serve_read() fatal and adjust tests accordingly ok jamsek


only "forward" implicit flush packets in serve_read() if they are expected ok jamsek


fix spurious "gotsh: unexpected flush packet" error when client is up-to-date ok op@


fix an issue where gotd fails to accept multiple have-lines from clients ok op, jamsek


replace malloc+memcpy with strndup. no functional change intended ok stsp@


remove bogus abort() call from gotsh echo_error()


fix capabilities announced by gotsh when no reference exist in repository ok op@


fix sending of capabilities from gotsh(1) in case repository has no refs