diff --git a/skills/kugetsu/scripts/kugetsu-config.sh b/skills/kugetsu/scripts/kugetsu-config.sh index 3d8c56e..c3f7a48 100755 --- a/skills/kugetsu/scripts/kugetsu-config.sh +++ b/skills/kugetsu/scripts/kugetsu-config.sh @@ -28,6 +28,7 @@ TASK_TIMEOUT_HOURS="${TASK_TIMEOUT_HOURS:-1}" NETWORK_RETRY_ATTEMPTS="${NETWORK_RETRY_ATTEMPTS:-3}" NETWORK_RETRY_DELAY_SECONDS="${NETWORK_RETRY_DELAY_SECONDS:-5}" +KUGETSU_BASE_BRANCH="${KUGETSU_BASE_BRANCH:-origin/main}" # Load user config overrides (~/.kugetsu/config) if [ -f "$KUGETSU_DIR/config" ]; then diff --git a/skills/kugetsu/scripts/kugetsu-queue-daemon.sh b/skills/kugetsu/scripts/kugetsu-queue-daemon.sh index b2d8b0d..2ff5024 100644 --- a/skills/kugetsu/scripts/kugetsu-queue-daemon.sh +++ b/skills/kugetsu/scripts/kugetsu-queue-daemon.sh @@ -75,7 +75,7 @@ check_task_completion() { local has_commits=false if [ -d "$worktree_path" ] && [ -d "$worktree_path/.git" ]; then - if [ -n "$(git -C "$worktree_path" log --oneline origin/main..HEAD 2>/dev/null)" ]; then + if [ -n "$(git -C "$worktree_path" log --oneline "$KUGETSU_BASE_BRANCH..HEAD" 2>/dev/null)" ]; then has_commits=true fi fi @@ -95,7 +95,7 @@ check_task_completion() { local has_commits=false if [ -d "$worktree_path" ] && [ -d "$worktree_path/.git" ]; then - if [ -n "$(git -C "$worktree_path" log --oneline origin/main..HEAD 2>/dev/null)" ]; then + if [ -n "$(git -C "$worktree_path" log --oneline "$KUGETSU_BASE_BRANCH..HEAD" 2>/dev/null)" ]; then has_commits=true fi fi diff --git a/skills/kugetsu/scripts/kugetsu-worktree.sh b/skills/kugetsu/scripts/kugetsu-worktree.sh index cfa0e42..38ab085 100755 --- a/skills/kugetsu/scripts/kugetsu-worktree.sh +++ b/skills/kugetsu/scripts/kugetsu-worktree.sh @@ -109,7 +109,7 @@ create_worktree() { fi echo "Creating branch '$branch_name'..." - if git -C "$worktree_path" checkout -b "$branch_name" origin/main 2>/dev/null; then + if git -C "$worktree_path" checkout -b "$branch_name" "$KUGETSU_BASE_BRANCH" 2>/dev/null; then : elif git -C "$worktree_path" checkout -b "$branch_name" main 2>/dev/null; then :