feat: add link command

This commit is contained in:
2026-09-03 15:36:21 +02:00
parent 63d04a9393
commit 54395f83e4
7 changed files with 812 additions and 2 deletions

31
src/cli/link.rs Normal file
View File

@@ -0,0 +1,31 @@
use std::path::PathBuf;
use clap::Subcommand;
#[derive(Subcommand, Debug)]
pub enum Link {
/// Move untracked paths into the store and symlink them back
Add {
/// Untracked or ignored paths inside the repository
#[arg(required = true)]
paths: Vec<PathBuf>,
/// Link to a store path that already exists
#[arg(long)]
force: bool,
},
/// List untracked paths a sandbox would still see
Check {
/// Limit the listing to these paths
paths: Vec<PathBuf>,
/// Print `<code> <path>` for scripts, as `git status --porcelain` does
#[arg(long)]
porcelain: bool,
/// Terminate porcelain entries with NUL
#[arg(short = 'z')]
null: bool,
},
}