commit: Add _CONSUME modifier flag

For many cases of commit, we can actually optimize things by simply "adopting"
the object rather than writing a new copy. For example, in rpm-ostree package
layering.

We can only make that optimization though if we take ownership of the file. This
commit hence adds an API where a caller tells us to do so. For now, that just
means we `unlink()` the files/dirs as we go, but we can now later add the
"adopt" optimization.

Closes: #1255
Approved by: jlebon
This commit is contained in:
Colin Walters authored and Atomic Bot committed 2017-10-10 13:02:08 +00:00
1 parent fc33ae018d
commit bba7eb8069
6 files changed
+65 -1

No files matched your search

+1
View File
@@ -773,6 +773,7 @@ _ostree_commit() {
--link-checkout-speedup
--no-xattrs
--orphan
--consume
--skip-if-unchanged
--table-output
--tar-autocreate-parents