Commit Briefs

2624d16568 Thomas Adam

replace got_repo_get_gitconfig_extensions with got_repo_has_extension

got_repo_get_gitconfig_extensions is only used in gotadmin to check if the preciousObjects extension is active; let's replace it with a function that just checks whether a certain extension is active. It simplifies future changes to the extensions handling. ok stsp@


21c2d8be42 Thomas Adam

got: minor refactor of got_pathlist_free() API

Accept flag parameter to optionally specify which pointers to free. This saves callers looping through the list to free pointers. ok + fix stsp@



0a58e7222f Thomas Adam

sync usage with reality

The -h and -V/--version flags must be given before the command; with those flags the command is actually optional, but don't over-complicate the usage string with these nitpicks. ok/improvements stsp@


e9424ba1b8 Thomas Adam

add gotadmin init -b <branch> to specify repo head ref

Similar to `git init -b`. Includes a change to `got import` behaviour such that "main" is no longer hardcoded by default; instead, we import to the branch resolved via the repository's HEAD reference unless `got import -b` is used, and only if HEAD cannot be resolved to a branch do we fallback to "main". includes fix plus ok from stsp@


b6b86fd1b9 Thomas Adam

remove trailing whitespace; patch by Josiah Frentsos


d6506a3d8f Thomas Adam

Group options in accordance with style(9)

patch by Josiah Frentsos


8b925c6ccd Thomas Adam

portable: add back sys/queue.h

Now that the handling of including sys/queue.h is better, there's no need to remove those lines from the source. Copy the location of those original sys/queue.h lines from upstream at the same line number, so as to avoid any conflicts in the future.


27b10c3cfd Thomas Adam

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@


a6da5f6b0d Thomas Adam

revert "clear the rest of the pack_fds pointers"

There is no need to clear local variables before returning from a function. ok tracey


df67eb78ca Thomas Adam

clear the rest of the pack_fds pointers


7cd528337b Thomas Adam

move got_opentempfd out of got_repo_open. ok stsp@

thanks for all the help massaging this diff


bfb5ee0b73 Thomas Adam

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


2cdcfdc6df Thomas Adam

add -q to "gotadmin pack" usage


c8fc6d14c6 Thomas Adam

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


85220b0e5b Thomas Adam

print additional progress information while packing

ok op@


641a8ee636 Thomas Adam

const-ify command and option tables

ok stsp


d2f35ef7f7 Thomas Adam

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


1ea7ccc6f3 Thomas Adam

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



c75a6067f1 Thomas Adam

add missing calls to got_repo_close() in gotadmin.c


c414a013eb Thomas Adam

match printf specifiers and (cast) types for portability

ok stsp


92a9e85d28 Thomas Adam

portable: add FreeBSD support

This adds the capability to compile got-portable on FreeBSD.


2b0eee35db Thomas Adam

enable gotadmin

Add gotadmin to configure.ac, etc., so it can be built and installed. OK thomas.adam