huskies: merge 1176 bug base_branch fallback hardcodes master instead of auto-detecting
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user