Commits
- Commit:
a6c98a81a9a97c9a6ad6a9e56f5e499f18749512
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
attempt to fix lingering gotd processes from reading clients
When reading clients close the connection early do not ignore
this condition in session_read. The code removed here intended
to handle the case of a writing client uploading a pack file,
and thus does not belong into session_read.c.
I overlooked this when splitting session.c into two files.
This might fix an issue observed on got.g.o where the anonymous
user was no longer connected and left lingering session_read and
repo_read processes hanging around until the request timeout was
reached.
- Commit:
9e03aee7bf92a67f29dd8caedbf048d8fe17970f
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
ensure gotd request timeout gets armed even if no request is received
- Commit:
b97d447ea2190d1a067e8384893e11358e4cd25b
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
raise log level of message that is logged when a gotd request times out
- Commit:
1a0b777c8b56bb65b213704af778bf17b98cb98c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
got-notify-http: rename auth_user -> authenticated_user
ok stsp@
- Commit:
a219eefd27b5f1aafc768c7b6c75ed0e203ee5cb
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
add default case to the switch statement in choose_patch()
Just in case the code futher up gets tweaked again such that the
validity check using strchr() will be skipped in some edge case.
Lucas agrees
- Commit:
aeac2f67f6cccbabc915bfd6d54fdaa96d18f180
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
make got stage -p behave the same way in interactive and -F modes for 'q'
Lucas agrees
- Commit:
9d61c99e2526730cfa5f256a3b0c37bfb25b8f93
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
make gotd notifications work when 'git push' is used instead of 'got send'
Git clients disconnect earlier, which resulted in session_write exiting before
notifications were sent. Do not treat early EOF as a fatal error if we are
sending notifications. Add regression test coverage for 'git push'.
Problem found by Thomas Adam.
- Commit:
0938a7e202849b4c8369dac2e1583f4c686ba3e4
- From:
- Lucas Gabriel Vuotto <lucas@lgv5.net>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
got: refactor choose_patch
Unify the handling of a response file and interactive use, handle EOF,
fix a memleak and make it easier to extend in the future. In particular,
interactive mode now doesn't loop forever on EOF.
Patch by Lucas Gabriel Vuotto.
Joint work with op.
- Commit:
0c54ff92fbff638e193cf6fe971867948f307e20
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
in gotd.conf(5) use .Sq instead of .Dv when referring to JSON field names
Reads better because .Dv has no discernable effect in terminal or HTML.
discussed with op@
- Commit:
708a729b1a69fe9c7aed6019dfe1ccbe8e3dd05b
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
move GOTD_ACCESS_DENIED more bits away from GOTD_ACCESS_GRANTED
A similar change was made to doas(1) recently in response to rowhammer.
- Commit:
007f735f804e64576042d40c130ff1a753138193
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
document common JSON notification object properties separately
Document properties which are always set just once and upfront,
and list the object types and type-specific properties afterwards.
- Commit:
4d88c28344644e770a30ea304c5b82fc82249629
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas.adam22@gmail.com>
- Date:
in gotd.conf, fix markup of the branch-deleted notification field list
This list was using -compact which was inconsistent with the lists for
other notification types.
- Commit:
c29409f9fb2acedc978ae8232c2ba5f958c83445
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
require -u option when invoking got-notify-http
The authenticated username is always available so it makes little
sense to treat it as an optional parameter.
Suggested by op@
- Commit:
bdf7ef6f884f541cbc9915752a2667570b3572c5
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
expose authenticated gotd user account in HTTP notifications
ok op@
- Commit:
a6cc387fec23bd4635f8b81cc025832da261d1ef
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: use standard shell idiom for default values
- Commit:
f56b35c7424f6ed0d598c12e78d16d5ed81d39d8
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: add the magic ".git" handling
like gotd, assume an implicit ".git" if the repo doesn't exist.
Merge gotweb_init_repo_dir() and gotweb_load_got_path() since the
former only sets repo_dir->name, and we don't realistically know
the name until we've opened the directory.
While here, unbreak the git worktree handling too.
Realistically, moving forward, we should issue a redirect to the
canonical URL or at least set the correct metadata in the document
to avoid having multiple URLs for the same content.
ok stsp; tiny change to repo_dir->name handling done after the ok.
- Commit:
74a9db5be05852a3ee9150fce2e80c8440b0afe3
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
regress: allow to customize GOT_TEST_HTTP_PORT
- Commit:
f571fea2849dfbb5568180ac8140282f5bc6b351
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
redo "got-fetch-http: fix GET request URL", without breaking tests
My previous fix for ~user in SSH URLs broke ~user in HTTP URLs,
as used on sourcehut. Sanitize the amount of leading and embedded
slashes in URLs to make things work in all cases.
The root cause of the test problem with naddy's previous diff was
likely in the http-server script itself, where a request like
GET //repo//info/refs?service=git-upload-pack somehow ended up as
GET $testroot///info/refs. We work around this here by avoiding
the double slashes.
- Commit:
c7d1a4d98cf513b3015d80f6948b25aad5929a17
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got-fetch-http: backout GET request URL fix
It broke the clone regression test.
- Commit:
1bce54cf7c1889402aca9736b413efdb45ed1b71
- From:
- Christian Weisgerber <naddy@mips.inka.de>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got-fetch-http: fix GET request URL
Add a leading '/' and do not produce a double "//" after the path.
ok op
- Commit:
3779dc8f300635352ce960e273f33f50177b83aa
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
backout got stage -R option addition
The stage command is usually used in a recursive manner, like 'got commit'.
Forcing users to specify -R all the time is deemed too inconvenient in
practice.
discussed on IRC with Lorenz (xha), Omar, and Lucas
- Commit:
c02f62d5c95274029a4a00e1aa97ef0d3f9bbeec
- From:
- Stefan Sperling <stsp@stsp.name>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix an fd leak in gotd's notify process
This leak resulted in the gotd notify process spinning on CPU in
an imsg_read() -> EAGAIN loop once it ran out of file descriptors.
- Commit:
2671aa26ceb0757e1fb1cc55b6d0571b592f5483
- From:
- James Cook <falsifian@falsifian.org>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
fix previous: "ssh" accidentally named "git"
- Commit:
a2dbf179c83e4b4b4268d26b32332ce3f25ed209
- From:
- James Cook <falsifian@falsifian.org>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
update protocol lists
Document http and https protocols in got.conf(5). Copied from got(1)
except reworded the part that referred to got.conf(5).
Change "send directive" to "send block" in got(1), since got.conf(5)
says there's "one configuration directive per line".
Adjust table widths: longest protocol name is now "https".
- Commit:
4fab33118efc47ea9fc567c240b00008710e7607
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
got-notify-http: fix I/O with TLS (again)
We try to handle early replies from the server, so we call tls_read()
at each "tick" of the event loop.
For the TLS case, however, bufio_read() will set bio->wantev, and
if we rely only on it we can deadlock trying to read data from the
server without having sent all the request.
Found out the hard way while trying to send several notifications
in one go.
ok stsp