Skip to content

Commit cbeb54f

Browse files
authored
feat(undo): restore versioned PUT and DELETE operations (#300)
1 parent 30a41d1 commit cbeb54f

8 files changed

Lines changed: 1786 additions & 20 deletions

File tree

crates/cli/src/commands/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ mod sql;
4949
mod stat;
5050
mod tag;
5151
mod tree;
52+
mod undo;
5253
mod version;
5354
mod watch;
5455

@@ -253,6 +254,9 @@ pub enum Commands {
253254
/// Deprecated: use `rc object remove`
254255
Rm(rm::RmArgs),
255256

257+
/// Restore a versioned PUT or DELETE operation without removing data history
258+
Undo(undo::UndoArgs),
259+
256260
/// Stream stdin to an object
257261
Pipe(pipe::PipeArgs),
258262

@@ -417,6 +421,13 @@ pub async fn execute(cli: Cli) -> ExitCode {
417421
Commands::Rm(args) => {
418422
rm::execute(args, output_options.resolve(OutputBehavior::HumanDefault)).await
419423
}
424+
Commands::Undo(args) => {
425+
undo::execute(
426+
args,
427+
output_options.resolve(OutputBehavior::StructuredDefault),
428+
)
429+
.await
430+
}
420431
Commands::Pipe(args) => {
421432
pipe::execute(args, output_options.resolve(OutputBehavior::HumanDefault)).await
422433
}

0 commit comments

Comments
 (0)