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

@@ -51,11 +51,17 @@ fn update_remote(branch: &str, create_upstream: bool) -> Result<()> {
if !has_remote {
// Create remote branch
println!("{}", format!("Branch '{branch}' does not exist on remote. Creating.").dimmed());
println!(
"{}",
format!("Branch '{branch}' does not exist on remote. Creating.").dimmed()
);
Git::set_upstream_branch(branch)?;
// Git::create_remote_branch(branch)?;
} else {
println!("{}", format!("Branch '{branch}' exists. Setting upstream.").dimmed());
println!(
"{}",
format!("Branch '{branch}' exists. Setting upstream.").dimmed()
);
Git::set_upstream_branch(branch)?;
}
@@ -73,11 +79,16 @@ fn main() -> Result<()> {
if args.verbose {
println!("{}", "Verbose mode enabled".dimmed());
println!("{}", format!("Base branch: {}", args.base).dimmed());
println!("{}", format!("Create upstream: {}", args.no_create_upstream).dimmed());
println!(
"{}",
format!("Create upstream: {}", args.no_create_upstream).dimmed()
);
}
// Determine branch name if not specified
let branch = args.branch.unwrap_or_else(|| format!("{}{}", args.prefix, args.worktree));
let branch = args
.branch
.unwrap_or_else(|| format!("{}{}", args.prefix, args.worktree));
// Normalize paths
let worktree_path = Path::new(&args.worktree).to_string_lossy();
@@ -93,7 +104,10 @@ fn main() -> Result<()> {
}
// Change to worktree directory
println!("{}", format!("Moving into worktree: {worktree_path}").dimmed());
println!(
"{}",
format!("Moving into worktree: {worktree_path}").dimmed()
);
env::set_current_dir(&args.worktree).context("Failed to change directory")?;
// Update remote