Commit Briefs


Stefan Sperling

reintroduce the 'got init' command as an alternative to 'gotadmin init'

New users trying out Got for the first time have reported trouble with finding a way to create a new repository, based on their assumption that Got works like Git which provides a 'git init' command. It doesn't cost us much effort to keep this command available in both programs to make discovery a bit easier for new users coming from Git.


Stefan Sperling

fix pack file transfers which do not use sidebands

Found while running 'got clone' against a git9 server, after an unrelated issue was reported by Lucas on IRC, thanks! ok op@


Mark Jamsek

plug 'got diff obj1 obj2' line metadata memory leak

Despite API callers not requesting it, we collect line metadata due to NULL pointer checks missing a level of indirection. Reported by Kyle Ackerman. ok op and stsp


Omar Polo

plug a leak in a few cmds: forgot to free(cwd) at the end

spotted while investigating for another leak spotted by Kyle Ackerman. ok stsp@ and jamsek




Omar Polo

gotwebd: remove previd and prevset query string parameter

They're no longer used.


Omar Polo

gotwebd: delete dead code

at this point we can't know if the client has disconnected, we just finished parsing the fcgi parameters and started handling the reply. We'll know whether the client disconnected only later, while trying to send the page content.


Omar Polo

gotwebd: use the last matching fastcgi parameter

in case of multiple parameters with the same name, use the last matching one.



Omar Polo

got{web,}d: handle multiple -v

only fatal*() and log_warn*() are now logged by default. log_info() is hidden behind a -v and log_debug behind -vv. Makes gotd and gotwebd way less chatty. ok stsp@


Omar Polo

gotwebd: use less temp files

Instead of allocating a whole set of temp fd per `listen' directive, just use a global set per "sockets" process. This is fine since gotwebd doesn't keep multiple connections open at the same time, once it enters gotwebd_process_request() it won't exit until all the page has been processed. (this because we don't have async APIs for got operations.) ok stsp@


Stefan Sperling

remove a redundant bounds check which gets elided by clang

found by + ok op@


Stefan Sperling

remove http client support from TODO list



Omar Polo

gotwebd: allow to change the user

ok stsp@


Omar Polo

got{,web}d: unify log.c

gotd and gotwebd are using almost the same log.c file, so unify. This only slightly changes gotwebd logs to include the process name, like gotd. ok stsp@


Omar Polo

gotwebd: mention the listening socket path under FILES

ok stsp@


Omar Polo

gotwebd: remove unix_socket_name

Now that `listen' is a top-level, `unix_socket_name' is useless. The default socket remains /var/www/run/gotweb.sock, to listen on an alternate socket now `listen on socket "/some/other/sock" can be used. part of a larger diff that's ok stsp@


Omar Polo

gotwebd: make `listen' a top-level statement

gotwebd only uses the server name (i.e. the Host HTTP header) to match the server blocks. Since gotwebd by design sits behind an http server which is expected to filter virtual hosts, there's little point in having `listen' per-server. part of a larger diff that's ok stsp@


Omar Polo

adjust gotwebd.conf(5) after recent change

it's no longer required for the host:port tuple to be used only by one server.


Omar Polo

gotwebd: simplify handling of unix sockets

- don't assume an implicit "listen on socket" when another listen was specified in a server block - allow servers to share the sockets they're listening on - fix unix_socket_name; now it's actually used - remove `listen on socket off' and `unix_socket off' options that are now no longer useful - unify the internal handling of the sockets, i.e. don't consider unix socket special. ok tracey@


Omar Polo

gotwebd: plug leak in get_addrs() error path

h is free'd by add_addr in case of error, but we still leak the getaddrinfo result. while here make the check strictier: addr_addr() fails with -1.


Omar Polo

got-fetch-http: be pedantic with the error checking

these functions are expected to return -1 on failure, be strict about it.