diff options
author | Justin Wernick <justin@worthe-it.co.za> | 2023-04-10 21:31:02 +0200 |
---|---|---|
committer | Justin Wernick <justin@worthe-it.co.za> | 2023-04-10 21:31:02 +0200 |
commit | 972319c1811e1a9c4f491a03ba92ea5a624cca5e (patch) | |
tree | 225e09bb5af58481c214f2422ad9b8f1527fa2db /src/lib.rs | |
parent | cc5fd57780595d3ec73dc4e0e884d4099e319878 (diff) |
Update the main branch of a repo
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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)) => { |