How to exclude some paths matching a pattern
I'm thinking how to exclude paths like .Trash from restoring with a regex.
Reading the commit introducing this feature to find out the regex syntax used in this feature, and its possibilities... it must be the regex syntax from <regex.h>, with flags: REG_EXTENDED | REG_NOSUB | REG_NEWLINE.--Imz 23:44, 3 February 2013 (UTC)
The simplest solution must be to patch the C code to implement an option like grep's -v (or --invert-match): "Invert the sense of matching, to select non-matching lines." (But "-v" has already been taken as an option of btrfs-restore...) Combining inclusion and exclusion patterns is more complex; which one should take precedence is not a clear thing; ideally, a language like that of "find" should be implemented for matching, but that's too much work. (As for me personally, I'm simply interested in excluding trash directories, and that's achievable with the simplest inversion option.)--Imz 00:15, 5 February 2013 (UTC)
(Wrote this wish down at https://github.com/josefbacik/btrfs-progs/issues/12 .--Imz 21:04, 5 February 2013 (UTC)