]> git.ipfire.org Git - thirdparty/util-linux.git/commit
hardlink: implement --exclude-subtree
authorKarel Zak <kzak@redhat.com>
Thu, 31 Oct 2024 09:51:11 +0000 (10:51 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 31 Oct 2024 10:08:42 +0000 (11:08 +0100)
commit3001da7fa9458c3cc0bdbd26047ed43e618e1071
treeac8c1b077b08fc40939871665ee185bcf3426bc1
parent9e2aafe5a493284615a17572c4ead4737bcc66a3
hardlink: implement --exclude-subtree

Now, it is possible to exclude files by their names, but it does not
allow for ignoring entire subtrees of the scanned hierarchy. The new
option only applies to directory names and forces the file-tree-walk
to skip the directory and all of its subdirectories.

This is based on FTW_SKIP_SUBTREE, which was originally only available
in glibc (since 2004). Therefore, the code is #ifdef-ed to make it
portable to other libc versions.

Addresses: https://github.com/util-linux/util-linux/discussions/3244
Signed-off-by: Karel Zak <kzak@redhat.com>
bash-completion/hardlink
misc-utils/hardlink.1.adoc
misc-utils/hardlink.c