feat(list): add allow and blocklist handling

This uses the .gitignore format to identify
which files should be allowed / blocked.

The allowlist gets precedence over the blocklist
if both are specified.
This commit is contained in:
Matteo Settenvini 2025-01-26 14:53:39 +01:00
parent 54075012aa
commit 344e16cf0f
Signed by: matteo
GPG key ID: 1C1B12600D81DE05
7 changed files with 188 additions and 9 deletions

View file

@ -18,6 +18,15 @@ pub struct Args {
#[arg(long)]
pub split_to: Option<PathBuf>,
/// An allowlist of files to keep, in .gitignore format.
/// Note: this will take precedence over all other removal decisions.
#[arg(long)]
pub allowlist: Option<PathBuf>,
/// A blocklist of files to remove, in .gitignore format.
#[arg(long)]
pub blocklist: Option<PathBuf>,
/// The location of the sysroot to clean up
pub sysroot_location: PathBuf,
}