Fix logic error in main branch selection
I was previously looking at two different lists, `candidates` and `branch_list`. So the numbers weren't matching up. This is fixed now.
This commit is contained in:
parent
af08c7e36b
commit
e0fd76b04f
3
git-tidy
3
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}")
|
||||
@ -121,6 +121,7 @@ def get_default_branch() -> str:
|
||||
selection = int(raw_input)
|
||||
except ValueError:
|
||||
continue
|
||||
print(selection)
|
||||
|
||||
return branch_list[selection]
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user