Commit Briefs

f4a5cef154 Omar Polo

gotwebd: set chroot path in config_init()

saves a bit fiddling around with ternary operators. sockets_run() will reset the chroot to the default since it calls again config_init(), but at that stage it's not important anymore. ok stsp@


23c35dae29 Omar Polo

change got_get_repo_tags' limit argument to size_t

The function already carefully avoids wrapping around zero. While here add a sanity check for limit == 0, like what was previously done for got_get_repo_commits().


a678036d5f Omar Polo

gotwebd.conf: error if chroot is the empty string



031687baf3 Omar Polo

gotwebd.conf: disallow yes/no for booleans

Supporting both "no" and "on" as valid syntax with an opposite meaning could easily result in accidental misconfiguration. Suggested by stsp, tracey agrees. Patch by Josiah Frentsos, thanks!


d571a1762e Omar Polo

drop unused strlen; ok stsp@


0a2fc48663 Omar Polo

gotwebd: make got_get_repo_commits take a size_t

and while here make sure 0 is rejected. requested by, improvements and ok stsp@


f4425f95a5 Omar Polo

gotwebd: disallow 1 for max_commits_display and report range errors

ok stsp


5144d22b0c Omar Polo

gotwebd: simplify got_get_repo_commits(): don't traverse all the commits!

In some cases (e.g. limit=1 for DIFF action) we could end up traversing all the commits instead of fetching just the one requested. Needless to say, this makes the diff page extremely slow. reported by and ok stsp@


563ffc1b6d Omar Polo

got, tog: correctly skip HEAD in build_refs_str()

s[strlen(s)] == '\0' is banally always true, the intent was to not skip refs that starts with "HEAD". style nit / ok stsp@



ac8217d34e Omar Polo

gotwebd: drop a few unneeded SRCS

fileindex.c, worktree.c, worktree_open.c and patch.c are not used in gotwebd. ok stsp


8476cc2a23 Omar Polo

remove proc_ispeer()

unused, and was dropped by the other copies of proc.c; reduces the diff with httpd' proc.c.


baaae61518 Stefan Sperling

make gotd avoid a "failed to push some refs" error from no-op 'git push'

gotsh was sending errors such as "unexpected end of file" and "unexpected flush-pkt" to the client when the client disconnected immediately after receiving reference announcements from the server. As a result, 'git push' with both sides up-to-date would show an obscure error message: = [up to date] main -> main error: failed to push some refs to 'ssh://example.com/git/repo.git Now we see: = [up to date] main -> main Everything up-to-date ok jamsek


cf31b4749a Stefan Sperling

fix a segfault in got diff when a root commit is passed to -c

Problem reported by Alexander Arkhipov ok jamsek


1f8d584437 Stefan Sperling

bump version number


9602b78078 Stefan Sperling

CHANGES for 0.89 (tags/0.89)


6b5246e4d4 Stefan Sperling

make 'got merge -c' fail even if new changes only affect unrelated paths

Otherwise, 'got merge -c' can silently revert already committed changes. Also fix GOT_ERR_MERGE_COMMIT_OUT_OF_DATE by giving it a value distinct from GOT_ERR_MERGE_STAGED_PATHS. Patch by James Cook


427615296b Stefan Sperling

make "got merge" refuse to run if a merge is in progress and the -a or

-c option wasn't passed. Patch by James Cook.


fb30794617 Omar Polo

PF_UNSPEC -> AF_UNSPEC

While they're the same value, it's more correct to use AF_UNSPEC in this case. While here, change SOCK_DGRAM to SOCK_STREAM since it's what we'll be using. ok stsp@


abf3e3f40c Omar Polo

remove host, host_v4 and host_v6; rename host_dns -> host

host_dns() (now just host()) uses getaddrinfo() which knows already how to handle IPv4/IPv6 addresses. Saves a good amount of duplication. ok stsp@


1adf41e808 Omar Polo

gotwebd: drop unused `prefixlen' from struct address

ok stsp@


83769d3032 Stefan Sperling

rename test to better reflect what it is checking for


993ef5ebc6 Stefan Sperling

add regression test for 'got rm *' $PWD removal

Patch by Mikhail


7f4e532051 Stefan Sperling

only delete empty directories appearing in arguments to 'got rm'

Make 'got rm' keep empty directories which are not explicitly listed for deletion. Deleting such directories is problematic in several use cases. Avoids deleting the current working directory when the user runs "got rm *" (pointed out by Mikhail), and avoids deletion of an empty directory "foo/" after 'got rm foo/a foo/b' (pointed out by op@). ok jamsek, op