From 972319c1811e1a9c4f491a03ba92ea5a624cca5e Mon Sep 17 00:00:00 2001 From: Justin Wernick Date: Mon, 10 Apr 2023 21:31:02 +0200 Subject: Update the main branch of 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 14b1a49..3a7d129 100644 --- a/src/parser.rs +++ b/src/parser.rs @@ -14,6 +14,7 @@ pub enum ShackleCommand { /// List all repositories available List, SetDescription(SetDescriptionArgs), + SetBranch(SetBranchArgs), Init(InitArgs), GitUploadPack(GitUploadPackArgs), GitReceivePack(GitReceivePackArgs), @@ -25,12 +26,20 @@ pub struct SetDescriptionArgs { pub description: String, } +#[derive(Parser, Clone, Debug, PartialEq, Eq)] +pub struct SetBranchArgs { + pub directory: PathBuf, + pub branch: String, +} + #[derive(Parser, Clone, Debug, PartialEq, Eq)] pub struct InitArgs { #[arg(long)] pub group: Option, #[arg(long)] pub description: Option, + #[arg(long, default_value = "main")] + pub branch: String, pub repo_name: String, } -- cgit v1.2.3