Skip to contentSkip to conversation

completion: support "git fetch --multiple"

PATCH New Nguyễn Thái Ngọc Duy 1 participant 1 message Sep 20, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 completion: support "git fetch --multiple"

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.

---
 contrib/completion/git-completion.bash | 1 +
 1 file changed, 1 insertion(+)
contrib/completion/git-completion.bash +1 -0
index d63d2dffd4..a66bec966b 100644
@@ -943,6 +943,7 @@ __git_complete_remote_or_refspec ()
 			*) ;;
 			esac
 			;;
+		--multiple) no_complete_refspec=1; break ;;
 		-*) ;;
 		*) remote="$i"; break ;;
 		esac
Signature · 1 line
2.19.0.rc0.337.ge906d732e7