]> git.ipfire.org Git - thirdparty/mkosi.git/commit
Add an internal tree copy implementation 183/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 27 Oct 2017 15:26:10 +0000 (17:26 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 30 Oct 2017 12:33:15 +0000 (13:33 +0100)
commit892f3b2352bc64601cc5fd78bd764150ec225d00
tree3da14b1f0b1a21969e89e548719052de3ae21a7c
parent52c160b18edf6d55efb9503ed6d1386e93f4a289
Add an internal tree copy implementation

The general idea is to copy everything, preserving access mode, times,
xattrs on files. An attempt to create the new object is first made,
followed by an unlink and a repeated attempt. This optimizes for the
case where the output tree is empty, which seems to be the common
thing in our case.

Reflink is attempted for normal files.

Symlinks are not adjusted: if they pointed outside of the tree being
copied, they might be dangling now.

Block and character device nodes and any other special files are not
copied.
mkosi