Commits


move 'got init' command to 'gotadmin init' This functionality is better suited for gotadmin because it is technically a server-side repository operation when we consider the 'got' tool as the client-side tool. I have plans to move 'got import' into gotadmin as well. ok op@


revert "clear the rest of the pack_fds pointers" There is no need to clear local variables before returning from a function. ok tracey


clear the rest of the pack_fds pointers


move got_opentempfd out of got_repo_open. ok stsp@ thanks for all the help massaging this diff


open temporary files needed for delta application in got_repo_open() This prepares for callers of got_repo_open() that cannot afford to open files in /tmp, such as gotwebd. In a follow-up change, we could ask such callers to pass in the required amount of open temporary files. One consequence is that got_repo_open() now requires the "cpath" pledge promise. Add the "cpath" promise to affected callers and remove it once the repository has been opened. ok tracey


add -q to "gotadmin pack" usage


add a -q (quiet) option to 'gotadmin pack'


print additional progress information while packing ok op@


const-ify command and option tables ok stsp


shrink the width of formatted output fields to their expected size Replace FMT_SCALED_STRSIZE with (FMT_SCALED_STRSIZE - 2) as field width when formatting output for printing. FMT_SCALED_STRSIZE includes space for a nul byte and a minus sign. Output values are expected to be always positive here. ok stsp


let gotadmin find the repository automatically if invoked in a work tree Move a small amount of code from worktree.c to a new file worktree_open.c, which contains everything required to open and close a work tree and inspect some of its basic parameters. This can be used by gotadmin. ok tracey


make 'gotadmin indexpack' unveil the repository read/write, not read-only


add missing calls to got_repo_close() in gotadmin.c


match printf specifiers and (cast) types for portability ok stsp


make 'gotadmin info' display separate send/fetch URLs if they differ