hmmm cannot enqueue adds because snapshot is source of truth but then scratch adding would make noise for laptop...
This commit is contained in:
@@ -23,9 +23,11 @@ fn main() {
|
||||
files.files[0]
|
||||
.append(Delta::now(patch))
|
||||
.expect("failed to add");
|
||||
files.files[0]
|
||||
.stage_persisted()
|
||||
.expect("failed to stage added");
|
||||
if !flags.enqueue_add {
|
||||
files.files[0]
|
||||
.stage_persisted()
|
||||
.expect("failed to stage added");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -55,6 +57,9 @@ struct Flags {
|
||||
|
||||
#[arg(short = 'd', long = "dry-run", default_value = "false")]
|
||||
dry_run: bool,
|
||||
|
||||
#[arg(short = 'q', long = "enqueue", default_value = "false")]
|
||||
enqueue_add: bool,
|
||||
}
|
||||
|
||||
impl Flags {
|
||||
@@ -115,6 +120,7 @@ mod test_flags {
|
||||
add: None,
|
||||
edit: false,
|
||||
dry_run: true,
|
||||
enqueue_add: false,
|
||||
};
|
||||
let files = flags.files().expect("failed to files from dir");
|
||||
assert_eq!(1, files.files.len());
|
||||
|
||||
Reference in New Issue
Block a user