chore: Fix formatting
All checks were successful
Code style / cargo-fmt (pull_request) Successful in 1m20s
Code style / cargo-check (pull_request) Successful in 1m14s
Code style / clippy (pull_request) Successful in 1m13s

Signed-off-by: Noah Knegt <git@noahknegt.com>
This commit is contained in:
2025-07-03 23:43:13 +02:00
parent cf5b30015a
commit 5d745678f3
3 changed files with 64 additions and 67 deletions

View File

@@ -39,10 +39,9 @@ fn main() -> Result<()> {
// This behavior follows git itself
None => {
let start = args.repo_url.rfind("/").unwrap() + 1;
let end = match args.repo_url.rfind(".git")
{
let end = match args.repo_url.rfind(".git") {
Some(index) => index,
None => args.repo_url.len()
None => args.repo_url.len(),
};
args.repo_url[start..end].to_owned()
@@ -56,7 +55,10 @@ fn main() -> Result<()> {
println!("{}", format!("Target directory: {target_dir}").dimmed());
}
println!("{}", "Setting up repository for worktree development".blue());
println!(
"{}",
"Setting up repository for worktree development".blue()
);
// Clone the repository as a bare clone
Git::clone_bare_repo(&args.repo_url, &target_dir)?;
@@ -71,6 +73,9 @@ fn main() -> Result<()> {
Git::fetch_remotes(&target_dir)?;
println!("{}", "Repository setup complete.".green());
println!("{}", format!("You can now create worktrees in '{target_dir}'.").green());
println!(
"{}",
format!("You can now create worktrees in '{target_dir}'.").green()
);
Ok(())
}