From f65bf6ccb7833d5e98d6088e7ca5b3d7e17431b5 Mon Sep 17 00:00:00 2001 From: Joseph Mearman Date: Sun, 23 Nov 2025 16:21:22 +0000 Subject: [PATCH] fix: remove unused short_name parameter from branch numbering functions The check_existing_branches (bash) and Get-NextBranchNumber (PowerShell) functions no longer use the short_name parameter since they now find the global maximum across ALL features. This commit: 1. Removes the unused parameter from function signatures 2. Updates all call sites to not pass the parameter This prevents the scripts from failing when the function is called with the wrong number of arguments. --- scripts/bash/create-new-feature.sh | 2 +- scripts/powershell/create-new-feature.ps1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/bash/create-new-feature.sh b/scripts/bash/create-new-feature.sh index a632c588..fe6d7399 100644 --- a/scripts/bash/create-new-feature.sh +++ b/scripts/bash/create-new-feature.sh @@ -238,7 +238,7 @@ fi if [ -z "$BRANCH_NUMBER" ]; then if [ "$HAS_GIT" = true ]; then # Check existing branches on remotes - BRANCH_NUMBER=$(check_existing_branches "$BRANCH_SUFFIX" "$SPECS_DIR") + BRANCH_NUMBER=$(check_existing_branches "$SPECS_DIR") else # Fall back to local directory check HIGHEST=$(get_highest_from_specs "$SPECS_DIR") diff --git a/scripts/powershell/create-new-feature.ps1 b/scripts/powershell/create-new-feature.ps1 index fce6b92f..2f0172e3 100644 --- a/scripts/powershell/create-new-feature.ps1 +++ b/scripts/powershell/create-new-feature.ps1 @@ -210,7 +210,7 @@ if ($ShortName) { if ($Number -eq 0) { if ($hasGit) { # Check existing branches on remotes - $Number = Get-NextBranchNumber -ShortName $branchSuffix -SpecsDir $specsDir + $Number = Get-NextBranchNumber -SpecsDir $specsDir } else { # Fall back to local directory check $Number = (Get-HighestNumberFromSpecs -SpecsDir $specsDir) + 1