diff options
author | Colin Walters <walters@verbum.org> | 2017-12-14 09:48:26 -0500 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-12-14 15:51:07 +0000 |
commit | 7935b881bfa1d57c9cad4ae0522fab90bcf46ab5 (patch) | |
tree | 5025f8e19ed03267eea50fbf6c51458c0b4a286f /src/libostree/ostree-repo-prune.c | |
parent | ad814d1c8abcf8ed27863586301ba47329e273b6 (diff) | |
download | ostree-7935b881bfa1d57c9cad4ae0522fab90bcf46ab5.tar.gz |
lib/repo: Add an API to mark a commit as partial
For the [rpm-ostree jigdo ♲📦](https://github.com/projectatomic/rpm-ostree/issues/1081) work.
We're basically doing "pull" via a non-libostree mechanism, and this
should be fully supported. As I mentioned earlier we should try to
have `ostree-repo-pull.c` only use public APIs; this gets us closer
to that.
Closes: #1376
Approved by: jlebon
Diffstat (limited to 'src/libostree/ostree-repo-prune.c')
-rw-r--r-- | src/libostree/ostree-repo-prune.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/libostree/ostree-repo-prune.c b/src/libostree/ostree-repo-prune.c index 9eec4ebe..1b65ae1c 100644 --- a/src/libostree/ostree-repo-prune.c +++ b/src/libostree/ostree-repo-prune.c @@ -37,16 +37,6 @@ typedef struct { } OtPruneData; static gboolean -prune_commitpartial_file (OstreeRepo *repo, - const char *checksum, - GCancellable *cancellable, - GError **error) -{ - g_autofree char *path = _ostree_get_commitpartial_path (checksum); - return ot_ensure_unlinked_at (repo->repo_dir_fd, path, error); -} - -static gboolean maybe_prune_loose_object (OtPruneData *data, OstreeRepoPruneFlags flags, const char *checksum, @@ -68,7 +58,7 @@ maybe_prune_loose_object (OtPruneData *data, if (objtype == OSTREE_OBJECT_TYPE_COMMIT) { - if (!prune_commitpartial_file (data->repo, checksum, cancellable, error)) + if (!ostree_repo_mark_commit_partial (data->repo, checksum, FALSE, error)) return FALSE; } |