From da8802d1fb0c5707877777ff4187238195eef16b Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Sat, 24 Jun 2023 21:52:37 +0200 Subject: Added a command to delete a repo --- src/parser.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/parser.rs') diff --git a/src/parser.rs b/src/parser.rs index ebd860b..30eb1e0 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -16,6 +16,8 @@ pub enum ShackleCommand { SetDescription(SetDescriptionArgs), /// Sets the main branch of the repository SetBranch(SetBranchArgs), + /// Deletes a repository + Delete(DeleteArgs), /// Quit the shell Exit, /// Server side command required to git fetch from the server @@ -57,6 +59,13 @@ pub struct SetBranchArgs { pub branch: String, } +#[derive(Parser, Clone, Debug, PartialEq, Eq)] +pub struct DeleteArgs { + /// The full relative path of the repository, for example git/shuckie/repo.git + #[arg(value_parser = RelativePathParser)] + pub directory: PathBuf, +} + #[derive(Parser, Clone, Debug, PartialEq, Eq)] pub struct GitUploadPackArgs { /// Do not try /.git/ if is no Git directory -- cgit v1.2.3