huskies: merge 1176 bug base_branch fallback hardcodes master instead of auto-detecting

This commit is contained in:
Huskies Agent
2026-07-16 16:22:46 +00:00
parent a4e2d4bc25
commit efd0097f76
11 changed files with 301 additions and 50 deletions
+2 -5
View File
@@ -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,