huskies: merge 1176 bug base_branch fallback hardcodes master instead of auto-detecting
This commit is contained in:
@@ -3,7 +3,7 @@ use crate::config::ProjectConfig;
|
||||
use std::path::Path;
|
||||
|
||||
use super::create::run_teardown_commands;
|
||||
use super::git::{branch_name, detect_base_branch, remove_worktree_sync};
|
||||
use super::git::{branch_name, remove_worktree_sync, resolve_base_branch};
|
||||
use super::{WorktreeInfo, worktree_path};
|
||||
|
||||
/// Remove a git worktree and its branch.
|
||||
@@ -34,10 +34,7 @@ pub async fn remove_worktree_by_story_id(
|
||||
return Err(format!("Worktree not found for story: {story_id}"));
|
||||
}
|
||||
let branch = branch_name(story_id);
|
||||
let base_branch = config
|
||||
.base_branch
|
||||
.clone()
|
||||
.unwrap_or_else(|| detect_base_branch(project_root));
|
||||
let base_branch = resolve_base_branch(project_root, config.base_branch.as_deref());
|
||||
let info = WorktreeInfo {
|
||||
path,
|
||||
branch,
|
||||
|
||||
Reference in New Issue
Block a user