451
done
452
}
453
454
+__git_has_doubledash ()
455
+{
456
+ local c=1
457
+ while [ $c -lt $COMP_CWORD ]; do
458
+ if [ "--" = "${COMP_WORDS[c]}" ]; then
459
+ return 0
460
+ fi
461
+ c=$((++c))
462
+ done
463
+ return 1
464
+}
465
+
466
__git_whitespacelist="nowarn warn error error-all strip"
467
468
_git_am ()
509
510
_git_add ()
511
{
512
+ __git_has_doubledash && return
513
+
514
local cur="${COMP_WORDS[COMP_CWORD]}"
515
case "$cur" in
516
--*)
525
526
_git_bisect ()
527
{
528
+ __git_has_doubledash && return
529
+
530
local subcommands="start bad good reset visualize replay log"
531
local subcommand="$(__git_find_subcommand "$subcommands")"
532
if [ -z "$subcommand" ]; then
629
630
_git_commit ()
631
{
632
+ __git_has_doubledash && return
633
+
634
local cur="${COMP_WORDS[COMP_CWORD]}"
635
case "$cur" in
636
--*)
650
651
_git_diff ()
652
{
653
+ __git_has_doubledash && return
654
+
655
local cur="${COMP_WORDS[COMP_CWORD]}"
656
case "$cur" in
657
--*)
754
755
_git_log ()
756
{
757
+ __git_has_doubledash && return
758
+
759
local cur="${COMP_WORDS[COMP_CWORD]}"
760
case "$cur" in
761
--pretty=*)
1107
1108
_git_reset ()
1109
{
1110
+ __git_has_doubledash && return
1111
+
1112
local cur="${COMP_WORDS[COMP_CWORD]}"
1113
case "$cur" in
1114
--*)
1121
1122
_git_shortlog ()
1123
{
1124
+ __git_has_doubledash && return
1125
+
1126
local cur="${COMP_WORDS[COMP_CWORD]}"
1127
case "$cur" in
1128
--*)
1169
1170
_git_submodule ()
1171
{
1172
+ __git_has_doubledash && return
1173
+
1174
local subcommands="add status init update"
1175
if [ -z "$(__git_find_subcommand "$subcommands")" ]; then
1176
local cur="${COMP_WORDS[COMP_CWORD]}"
1377
1378
_gitk ()
1379
{
1380
+ __git_has_doubledash && return
1381
+
1382
local cur="${COMP_WORDS[COMP_CWORD]}"
1383
local g="$(git rev-parse --git-dir 2>/dev/null)"
1384
local merge=""