Commit Briefs
fix bogus "reference not found" error from 'got send' (main)
When a reference exists on the server but not locally, 'got send' could fail to ignore this reference as intended, raising an error instead. Add a test case for this isssue.
plug memory leaks in 'got fetch' and 'got send'
In addition to the previous commit [c450903bc2] that plugged fetch and send leaks, free what would be the path entry's path member, which is leaked when attempting to add a duplicate. And in the fetch case, free refname and id when got_pathlist_insert() returns err. ok stsp@
make gotwebd.css styling consistent across all window sizes
Patch by op@, who is at the wrong computer right now
plug a memory leak in got_pack_create()
Patch by: Kyle Ackerman
minor gotwebd.css styling changes for some QoL updates on mobile devices
Patch by Bradley Taunt ok op@
plug memory leaks in 'got fetch' and 'got send'
Check for duplicate items added to pathlists, and free associated data in case we were attempting to add a duplicate. Patch by: Kyle Ackerman
do not call fmemopen(3) with a zero size argument
Calling fmemopen(3) with a size of zero leads to an "Invalid argument" error. One symptom of this issue are failing gotd notifications: gotd[48539]: render notification: fmemopen: Invalid argument Add an email notification test case which triggers the above error. Reported by Mischa Peters
plug some leak around imsg_init() error paths
tested and ok stsp@
delete trailing whitespaces
done mechanically with $ find . -iname \*.[ch] -exec sed -i -E 's/[[:space:]]+$//' {} + with some revert for bundled files and a manual tweak for got-fetch-http.c
don't iterate binary file changes with (un)stage/revert -p
As reported by Johannes Thyssen Tishman, 'got stage -p $binaryfile' iterates each hunk, and produces unexpected behaviour when answering 'y'. Instead, present the standard "Binary files differ" message and only allow staging (or unstaging or reverting) the entire binary file. Includes tests for stage -p but unstage and revert -p tests are still needed. tweak + ok stsp@
use a topological commit graph for the ancestry check in 'got send'
Fixes spurious "branch on server has a different ancestry" errors from 'got send' when the repository history contains merge commits.
gotwebd: fix out of bound access while handling the config
For the first 13 iterations of the loop we read behind the start of the array. Instead of just adding a range check, rewrite the code to split the loop in two so it's easier to follow. Reported by Timo Myyrä ok stsp@