Commit Briefs

593303ab69 Thomas Adam

fix more missing resets of file position to zero after truncating files (portable)

ok op@


2b02ed351e Thomas Adam

reset file position when reusing per-repository temporary files

When reusing a temporary file, do not forget to reset its file position to zero. Otherwise, opening multiple raw objects in a row can fail during delta application with an unexpected file size reported by stat(2). Problem reported by Aaron Lin Problem reproduced and fix verified with a repository provided by Aaron. I have unsuccessfully tried to write a regression test for this. ok op@



46ed2a07cb Thomas Adam

fix gotd reload when /etc/gotd-secrets.conf is used

When sending the configuration to the newly reloaded gotd process we must send the path to the secrets file if it is being used. Otherwise, the new process will die with "unexpected amount of data received in imsg" errors. Test coverage will be added later as part of some new gotsysd tests which I have in progress.


5400b2df83 Thomas Adam

fix 'gotctl reload -s secrets' failing once gotd has failed to reload once

Reset reload secrets state on reload failure, such that the next reload attempt will not be rejected with an 'unexpected imsg' error.


d8c5a49979 Thomas Adam

forbid the '$' and '#' symbols in gotsys.conf reference names

These symbols are also part of configuration file syntax and should therefore be avoided.


c686c19fa4 Thomas Adam

update gotwebd favicons to show the smiley fish only




076101f2df Thomas Adam

introduce gotsys_ref_name_is_valid()

We need to enforce additional restrictions on reference names specified in gotsys.conf in order to prevent escaping to arbitrary gotd.conf syntax. Add test coverage.


1b4b319ba6 Thomas Adam

remove hidden gotsys.conf draft text about a "publish" directive

This directive will not be implemented in the final design. Instead we will be adding authentication to gotwebd with associated config syntax.



c472081f11 Thomas Adam

remove (undocumented) support for setting an SMTP relay in gotsys.conf

SMTP relays for email notifications will only be configured server-side.


3437aec6cc Thomas Adam

remove a TODO item that is done


81e258b8f1 Thomas Adam

do not clobber changes staged via stage -p during 'got revert'

While we must install staged blob contents during revert if there are staged changes, the base blob ID recorded in the file index must always reflect the actual base blob from the base commit. Setting the base blob ID to that of a staged blob causes problems. The staged blob's ID is tracked in a separate field. ok op@


b8ea12eb10 Thomas Adam

fix test failures related to clone -a introduced with previous commits

Use a dedicated flag to keep track of HEAD ref creation state, rather than checking pe == NULL.





ec88dafcbf Thomas Adam

pick a default branch to clone when the server does not advertise HEAD symref

Avoids the need to use got clone -b to get anything at all from a server implementation which does not advertise a HEAD symref. Patch by martijn@


420d805f8f Thomas Adam

fix gotd branch protection rejecting commits that already exist on server

When a reference update sends an empty pack file because the objects already exist on a different branch, gotd was wrongly rejecting the reference update. The logic which protects references from moving kicked in, but didn't account for this particular case. Run a YCA check to ensure the client is only appending new commits to the branch and allow the ref update to proceed if so. Add test coverage. Problem reported by martijn@


68933934fd Thomas Adam

fix bogus "bad offset in pack file" errors wrongly raised by gotd

Because copy_ref_delta() was forgetting to update the *outsize output parameter, when clients sent ref-deltas gotd was miscalculating the on-disk size of the pack file and would report "bad offset in pack file" if an object was stored at an offset beyond the miscalculated smaller size.


c592c4f4c3 Thomas Adam

add a TODO item for a bug between stage -p and revert


cb5766858e Thomas Adam

make our pack-refs header format align with the expectations of git 2.50.0

Fixes regress failures due to 'git gc' complaining, as of 2.50.0: '# pack-refs with:' does not start with '# pack-refs with: ' reported by naddy@ ok op@


0eceadf34c Thomas Adam

portable: set next version