commit - fc457d247e3308a380ad2a41fd5a81c048625751
commit + c8fc6d14c6e1f80c4c21a32c3e40a6bfe4638fcc
blob - 997a10f0a2c6d6c9750ef3660207ac358a4d56ea
blob + 80fd9074549181f88fa96e0b7e0ee1063bec0780
--- gotadmin/gotadmin.1
+++ gotadmin/gotadmin.1
.Xr got 1
work tree, use the repository path associated with this work tree.
.El
-.It Cm pack Oo Fl a Oc Oo Fl r Ar repository-path Oc Oo Fl x Ar reference Oc Op Ar reference ...
+.It Cm pack Oo Fl a Oc Oo Fl r Ar repository-path Oc Oo Fl x Ar reference Oc Oo Fl q Oc Op Ar reference ...
Generate a new pack file and a corresponding pack file index.
By default, add any loose objects which are reachable via any references
to the generated pack file.
Exclusion takes precedence over inclusion.
If a reference appears in both the included and excluded lists, it will
be excluded.
+.It Fl q
+Suppress progress reporting output.
.El
.Tg ix
.It Cm indexpack Ar packfile-path
blob - 37d7ec0f921d8abef32afdde2aa3b96641ed164b
blob + 3065789c1c380a77405b8b60de0879a6c8f04615
--- gotadmin/gotadmin.c
+++ gotadmin/gotadmin.c
const struct got_error *error = NULL;
char *repo_path = NULL;
struct got_repository *repo = NULL;
- int ch, i, loose_obj_only = 1;
+ int ch, i, loose_obj_only = 1, verbosity = 0;
struct got_object_id *pack_hash = NULL;
char *id_str = NULL;
struct got_pack_progress_arg ppa;
TAILQ_INIT(&exclude_refs);
TAILQ_INIT(&include_refs);
- while ((ch = getopt(argc, argv, "ar:x:")) != -1) {
+ while ((ch = getopt(argc, argv, "ar:x:q")) != -1) {
switch (ch) {
case 'a':
loose_obj_only = 0;
optarg, NULL);
if (error)
return error;
+ break;
+ case 'q':
+ verbosity = -1;
break;
default:
usage_pack();
ppa.last_scaled_size[0] = '\0';
ppa.last_p_indexed = -1;
ppa.last_p_resolved = -1;
+ ppa.verbosity = verbosity;
error = got_repo_pack_objects(&packfile, &pack_hash,
&include_refs, &exclude_refs, repo, loose_obj_only,
error = got_object_id_str(&id_str, pack_hash);
if (error)
goto done;
- printf("\nWrote %s.pack\n", id_str);
+ if (verbosity >= 0)
+ printf("\nWrote %s.pack\n", id_str);
error = got_repo_index_pack(packfile, pack_hash, repo,
pack_index_progress, &ppa, check_cancelled, NULL);
if (error)
goto done;
- printf("\nIndexed %s.pack\n", id_str);
+ if (verbosity >= 0)
+ printf("\nIndexed %s.pack\n", id_str);
done:
if (repo)
got_repo_close(repo);
blob - 943365b98b4c77208dff732937dfafcd5fe825a7
blob + f2acf22971de6d69864669240411b42ba43f58bc
--- regress/cmdline/pack.sh
+++ regress/cmdline/pack.sh
(cd $testroot/wt && got commit -m "edit alpha" >/dev/null)
local commit1=`git_show_branch_head $testroot/repo mybranch`
- gotadmin pack -r $testroot/repo -x master master \
- > /dev/null 2> $testroot/stderr
+ gotadmin pack -q -r $testroot/repo -x master master 2> $testroot/stderr
ret=$?
if [ $ret -eq 0 ]; then
echo "gotadmin pack succeeded unexpectedly" >&2
# pack objects belonging to the 'master' branch; its objects
# should then be excluded while packing 'mybranch' since they
# are already packed
- gotadmin pack -r $testroot/repo master > /dev/null
+ gotadmin pack -q -r $testroot/repo master
ret=$?
if [ $ret -ne 0 ]; then
echo "gotadmin pack failed unexpectedly" >&2
(cd $testroot/wt && got commit -m "edit alpha" >/dev/null)
# pack objects belonging to the 'master' branch
- gotadmin pack -r $testroot/repo master > /dev/null
+ gotadmin pack -q -r $testroot/repo master
ret=$?
if [ $ret -ne 0 ]; then
echo "gotadmin pack failed unexpectedly" >&2