GNOME Bugzilla – Bug 707582
Add a new API for `ostree init`
Last modified: 2013-09-05 18:26:49 UTC
See patches. Also renames ostree_repo_check to ostree_repo_open, as we discussed on IRC.
Created attachment 254196 [details] [review] repo: Use constructed, not constructor
Created attachment 254197 [details] [review] repo: Move the 'init' builtin command to a public API, ostree_repo_create
Created attachment 254198 [details] [review] repo: Rename ostree_repo_check to ostree_repo_open And add a cancellable parameter.
Review of attachment 254196 [details] [review]: This could use just a very brief "why" - just like "It's simpler since we don't need to override anything."? ::: src/libostree/ostree-repo.c @@ -169,1 @@ Hm, and we don't need to chain up because the parent is GObject? I guess that's OK, but it feels like the best practice is to chain anyways in case you change the base class later.
Review of attachment 254197 [details] [review]: Just a minor doc comment. Also I do tend to say "why" in the commit, in this case something like: "Continuing the goal of moving more of the commandline into API." ::: src/libostree/ostree-repo.c @@ +53,3 @@ * repositories that can be served via a static HTTP server. * + * An #OstreeRepo object is just a wrapper around a file path; creating ...until you open it. Something like: "Creating an #OstreeRepo involves no disk I/O. Use ostree_repo_check() to load existing repositories from disk, or ostree_repo_create() to make a new one at the given path." ?
Review of attachment 254198 [details] [review]: "It's a better name." Or something. Otherwise looks good!
Created attachment 254201 [details] [review] repo: Use constructed, not constructor It's simpler to do this after the object is constructed, rather than in the middle of construction.
Created attachment 254202 [details] [review] repo: Move the 'init' builtin command to a public API, ostree_repo_create This continues the goal of making more of ostree accessible by API, rather than forking out to subprocesses.
Created attachment 254203 [details] [review] repo: Rename ostree_repo_check to ostree_repo_open As it more clearly describes what the function does: load the repo from disk and initialize it. At the same time, add a cancellable parameter.
Review of attachment 254201 [details] [review]: Yep!
Review of attachment 254202 [details] [review]: Looks good.
Review of attachment 254203 [details] [review]: Looks good, thanks!
git-bz messed up