lib/commit: (refactor) Clean up delta bare write API
authorColin Walters <walters@verbum.org>
Fri, 13 Oct 2017 21:40:16 +0000 (17:40 -0400)
committerAtomic Bot <atomic-devel@projectatomic.io>
Wed, 18 Oct 2017 14:07:55 +0000 (14:07 +0000)
commita2f8315eaee1bfba0f5f37a9d2867147d9aa65bd
tree9b7ffe1344500e234e0ec206ddd2490572e3e5a5
parent40a0b9fb73f9b73d5257e05aa3441b9f79c77cf6
lib/commit: (refactor) Clean up delta bare write API

The way `_ostree_repo_open_content_bare()` did both looking for the object and
possibly creating a new fd was just weird and inconsistent with e.g. the pull
code where we always call `has_object()` first.

Just call `has_object()` in the delta paths that used this too, making the
implementation right now a thin wrapper around
`glnx_open_tmpfile_linkable_at()`, but this is prep for a later patch which does
more.

Closes: #1283
Approved by: jlebon
src/libostree/ostree-repo-commit.c
src/libostree/ostree-repo-private.h
src/libostree/ostree-repo-static-delta-processing.c