Commits


remove unneded wbuf->fd = -1 There's no need to set the fd to -1 on ibufs created with imsg_create(3), and it was probably never needed.


convert to use imsg_get_fd() While here also fix a fd leak in got-read-pack. We were dup'ing imsg.fd without closing imsg.fd later; instead just use imsg_get_fd() to extract the file descriptor. Tested by falsifian and Kyle Ackerman, thanks! 'go ahead' stsp@


allow remotes without urls in git config Also, add tests. This change lets got and related tools work when the git config file has "remote" sections without urls, like this one in one of my git-annex git repositories: [remote "h0-rsync"] annex-rsyncurl = (some url) annex-uuid = (some uuid) skipFetchAll = true Running tog and many got commands there would previously result in: $ tog got-read-gitconfig: gitconfig syntax error tog: gitconfig syntax error The change to got-read-gitconfig.c is by stsp@, with ok from op@ (and now me). Tests ok stsp@.


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>


got-read-gitconfig: send key-value pairs for extensions Most extension allow only for a boolean value so the current behaviour of just sending the extension with a trueish value is fine. However, some extensions that we could eventually support (like "objectformat") have a string value. This is a preparatory step towards that. ok stsp@


imsg_add() frees its msg argument on error; avoid double-free in error paths


mark some function parameters as 'const', as they should be; patch by Omar Polo


provide separate send {} and fetch {} configuration blocks in got.conf Feature requested by naddy. ok naddy, who also suggested some tweaks that will arrive shortly


make close(2) failure checks consistent; check 'close() == -1' everywhere ok millert, naddy


detect unknown repository format extensions (such as sha256 format) ok millert


send gitconfig imsg string values the same way as gotconfig ones are sent


Stop including <sys/syslimits.h> directly. POSIX says the limits defined there are available from <limits.h>, which almost all affected source files already included anyway. ok millert stsp


do not rely on <zlib.h> to pull in <unistd.h> ok stsp


move functions from privsep.c to the helpers which use them where possible


add support for repository mirrors to 'got clone' and 'got fetch'


read repository owner name with gitconfig parser instead of a hand-rolled one


parse remotes from gitconfig


obtain repo format version and commit author name/email from .git/config