From bcf602303441d202438f34934fd3f1e9611b3962 Mon Sep 17 00:00:00 2001 From: James Smith Date: Mon, 30 Jan 2023 15:12:16 +0200 Subject: [PATCH] Fix bug in branch selection logic I was looking at the wrong length. Need branch_list, not candidates. --- git-tidy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-tidy b/git-tidy index 126444c..9e89536 100755 --- a/git-tidy +++ b/git-tidy @@ -111,7 +111,7 @@ def get_default_branch() -> str: # If there's no clear default, let the user select which one to use: selection = -1 - while (selection < 0) or (selection >= len(candidates)): + while (selection < 0) or (selection >= len(branch_list)): print("Unable to determine default branch automatically. Please select one:") for n, branch in enumerate(branch_list): print(f"{n}: {branch}")