# [PATCH] completion: support "git fetch --multiple"

1 messages from 2018-09-20 to 2018-09-20. Participants: Nguyễn Thái Ngọc Duy.
Thread: https://gitlist.dev/t/49391

## Nguyễn Thái Ngọc Duy, 2018-09-20 16:37

Subject: [PATCH] completion: support "git fetch --multiple"
Message-ID: <20180920163733.20046-1-pclouds@gmail.com>
URL: https://gitlist.dev/e/20180920163733.20046-1-pclouds%40gmail.com

```
When --multiple is given, the remaining arguments are remote names,
not one remote followed by zero or more refspec. Detect this case,
disable refspec completion, and pretend no remote is seen in order to
complete multiple of them.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 contrib/completion/git-completion.bash | 1 +
 1 file changed, 1 insertion(+)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index d63d2dffd4..a66bec966b 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -943,6 +943,7 @@ __git_complete_remote_or_refspec ()
 			*) ;;
 			esac
 			;;
+		--multiple) no_complete_refspec=1; break ;;
 		-*) ;;
 		*) remote="$i"; break ;;
 		esac
-- 
2.19.0.rc0.337.ge906d732e7


```
