completions/git: fix regression causing wrong remote-branch completions

Fixes 54971621de (completions/git: show url as description for remote
completion, 2025-04-13).
Fixes #11482
This commit is contained in:
Johannes Altmanninger
2025-05-12 23:12:33 +02:00
parent 107e4d11de
commit 594b8730d8

View File

@@ -786,7 +786,7 @@ end
# Suggest branches for the specified remote - returns 1 if no known remote is specified
function __fish_git_branch_for_remote
set -l remotes (__fish_git_remotes)
set -l remotes (__fish_git remote 2>/dev/null)
set -l remote
set -l cmd (commandline -xpc)
for r in $remotes