summaryrefslogtreecommitdiff
path: root/src/ostree/main.c
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2013-08-25 15:11:05 -0400
committerColin Walters <walters@verbum.org>2013-08-25 15:28:23 -0400
commitedfa76fad5d2fc92d753c3317333200d552b99e9 (patch)
tree6b76d3928db6c3dbcfde5292b58b5b06f4163ebd /src/ostree/main.c
parent6c61b1910714c5bde7f35594ab7fcd980d03c8f1 (diff)
downloadostree-edfa76fad5d2fc92d753c3317333200d552b99e9.tar.gz
main: Code cleanup by passing OstreeRepo * directly to builtins
It turns out every builtin (with one special exception) that takes a repo argument did the same thing; let's just centralize it. The special exception was "ostree init --repo=foo" where foo is expected to *not* actually be a repo. In that case, simply skip the ostree_repo_check() invocation. https://bugzilla.gnome.org/show_bug.cgi?id=706762
Diffstat (limited to 'src/ostree/main.c')
-rw-r--r--src/ostree/main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ostree/main.c b/src/ostree/main.c
index ae0e3ce4..b7d40240 100644
--- a/src/ostree/main.c
+++ b/src/ostree/main.c
@@ -39,7 +39,7 @@ static OstreeCommand commands[] = {
{ "checksum", ostree_builtin_checksum, OSTREE_BUILTIN_FLAG_NO_REPO },
{ "diff", ostree_builtin_diff, 0 },
{ "fsck", ostree_builtin_fsck, 0 },
- { "init", ostree_builtin_init, 0 },
+ { "init", ostree_builtin_init, OSTREE_BUILTIN_FLAG_NO_CHECK },
{ "log", ostree_builtin_log, 0 },
{ "ls", ostree_builtin_ls, 0 },
{ "refs", ostree_builtin_refs, 0 },