summaryrefslogtreecommitdiff
path: root/src/parser.rs
diff options
context:
space:
mode:
authorJustin Wernick <justin@worthe-it.co.za>2023-04-10 21:31:02 +0200
committerJustin Wernick <justin@worthe-it.co.za>2023-04-10 21:31:02 +0200
commit972319c1811e1a9c4f491a03ba92ea5a624cca5e (patch)
tree225e09bb5af58481c214f2422ad9b8f1527fa2db /src/parser.rs
parentcc5fd57780595d3ec73dc4e0e884d4099e319878 (diff)
Update the main branch of a repo
Diffstat (limited to 'src/parser.rs')
-rw-r--r--src/parser.rs9
1 files changed, 9 insertions, 0 deletions
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),
@@ -26,11 +27,19 @@ pub struct SetDescriptionArgs {
}
#[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<String>,
#[arg(long)]
pub description: Option<String>,
+ #[arg(long, default_value = "main")]
+ pub branch: String,
pub repo_name: String,
}