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.

Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Nguyễn Thái Ngọc Duy 2018-09-20 18:37:33 +02:00 committed by Junio C Hamano
parent 150f307afc
commit b5619f6d2b

View File

@ -943,6 +943,7 @@ __git_complete_remote_or_refspec ()
*) ;;
esac
;;
--multiple) no_complete_refspec=1; break ;;
-*) ;;
*) remote="$i"; break ;;
esac