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
@@ -5,7 +5,7 @@ use std::path::Path;
use std::process::Command;
use super::git::{
branch_name, configure_sparse_checkout, create_worktree_sync, detect_base_branch,
branch_name, configure_sparse_checkout, create_worktree_sync, resolve_base_branch,
};
use super::{WorktreeInfo, worktree_path, write_mcp_json};
@@ -42,10 +42,7 @@ pub async fn create_worktree(
) -> Result<WorktreeInfo, String> {
let wt_path = worktree_path(project_root, 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 root = project_root.to_path_buf();
// Already exists — reuse without re-running destructive setup commands.