summaryrefslogtreecommitdiff
path: root/src/lib.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/lib.rs
parentcc5fd57780595d3ec73dc4e0e884d4099e319878 (diff)
Update the main branch of a repo
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 196078c..134ba97 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -33,12 +33,17 @@ pub fn run_command(user_input: String) -> Result<ControlFlow<(), ()>, ShackleErr
git::set_description(&directory, &description)?;
println!("Successfully updated description");
}
+ Ok(ShackleCommand::SetBranch(SetBranchArgs { directory, branch })) => {
+ git::set_branch(&directory, &branch)?;
+ println!("Successfully updated branch");
+ }
Ok(ShackleCommand::Init(InitArgs {
repo_name,
group,
description,
+ branch,
})) => {
- let init_result = git::init(&repo_name, &group, &description)?;
+ let init_result = git::init(&repo_name, &group, &description, &branch)?;
println!("Successfully created \"{}\"", init_result.path.display());
}
Ok(ShackleCommand::GitUploadPack(upload_pack_args)) => {