#992128 git-completion.bash: not completing branch names in git fetch

Package:
git
Source:
git
Description:
fast, scalable, distributed revision control system
Submitter:
Tobias Bengfort
Date:
2021-08-12 12:27:03 UTC
Severity:
normal
#992128#5
Date:
2021-08-12 12:23:58 UTC
From:
To:
Dear Maintainer,

I have an issue with bash autocompletion and git fetch:

   $ git fetch origin ma<TAB>

completes to

   $ git fetch origin main:main
   fatal: Refusing to fetch into current branch refs/heads/main of non-bare repository

I would have expected the following completion:

   $ git fetch origin main

A fix would be highly appriciated!

thanks
tobias