Commits


use a separate .cvg meta data directory for cvg(1) work trees This prevents mixing the use of got and cvg clients in the same work tree. Avoids confusion going forward while cvg differentiates itself further. tog(1) and gotadmin(1) remain compatible with both work tree formats. These tools only read work trees to locate the corresponding repository.


take reachability in consideration when cleaning redundant packfiles This wraps the cleaning up of loose objects and redundant pack files under a new functions, making the _prepare() and _complete() functions unnecessary. It walks the reachable commits unconditionally since that information is always needed and adapt how we purge loose objects after this change. The progress function is changed too and we log `ncommits' first, followed by the number of loose objects, followed by the rest. Pack files are now considered redundant when all their objects are provided by a bigger pack or are unreachable. ok stsp


make 'gotadmin load' always read data from standard input This provides better symmetry with 'gotadmin dump', and allows us to pass the list of references as command line arguments, replacing the -b option. The -l option now takes an argument which specifies the bundle file rather than requiring data to be fed on stdin with -l which feels awkward. ok op@


gotadmin load: don't add a newline when listing refs the newline is only needed after the progress output, which is not present in the 'listing refs' case.


add an initial implementation of gotadmin load it is intended to be the counterpart of `gotadmin dump' and, just like it, there's planned support for handling fast-import stream. At the moment it only deals with git bundles. ok stsp


add an initial implementation of gotadmin dump gotadmin dump is used to export (part of) the history of the repository; at the moment it only generates git bundles (which are pack files with a header) but support to generate a fast-import stream is planned. ok/tweaks stsp and jamsek


fix cleanup progress reporting output


add a lock for the cleanup operation This adds the functions got_repo_cleanup_prepare() and _complete() to lock/unlock the repository to prevent multiple `gotadmin cleanup' or `git gc' operations to run in parallel. improvements and ok stsp@


gotadmin cleanup: remove redundant pack files improvements and ok stsp@


include sha2.h too where sha1.h is included In preparation for wide sha256 support; stsp@ agrees. Change done mechanically with find . -iname \*.[cy] -exec sam {} + X ,x/<sha1\.h>/i/\n#include <sha2.h>


gotadmin pack: add a -D flag to force using ref-delta Intended mostly for the regress suite, so we'll be able to test also the ref-delta code paths. ok stsp@


got/tog/gotadmin: pledge earlier In the case of tog move setlocale(3) before pledge(2), as suggested by stsp. ok stsp@


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@


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@


sort getopt() option lists and switch statements; patch by Josiah Frentsos