Skip to content

Commit 0285118

Browse files
felipecgitster
authored andcommitted
completion: get rid of empty COMPREPLY assignments
There's no functional reason for those, the only purpose they are supposed to serve is to say "we don't provide any words here", but even for that it's not used consistently. Signed-off-by: Felipe Contreras <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent cdbff7d commit 0285118

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

contrib/completion/git-completion.bash

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,6 @@ __gitcomp ()
208208

209209
case "$cur_" in
210210
--*=)
211-
COMPREPLY=()
212211
;;
213212
*)
214213
local IFS=$'\n'
@@ -614,7 +613,6 @@ __git_complete_remote_or_refspec ()
614613
case "$cmd" in
615614
push) no_complete_refspec=1 ;;
616615
fetch)
617-
COMPREPLY=()
618616
return
619617
;;
620618
*) ;;
@@ -630,7 +628,6 @@ __git_complete_remote_or_refspec ()
630628
return
631629
fi
632630
if [ $no_complete_refspec = 1 ]; then
633-
COMPREPLY=()
634631
return
635632
fi
636633
[ "$remote" = "." ] && remote=
@@ -951,7 +948,6 @@ _git_am ()
951948
"
952949
return
953950
esac
954-
COMPREPLY=()
955951
}
956952

957953
_git_apply ()
@@ -971,7 +967,6 @@ _git_apply ()
971967
"
972968
return
973969
esac
974-
COMPREPLY=()
975970
}
976971

977972
_git_add ()
@@ -1031,7 +1026,6 @@ _git_bisect ()
10311026
__gitcomp_nl "$(__git_refs)"
10321027
;;
10331028
*)
1034-
COMPREPLY=()
10351029
;;
10361030
esac
10371031
}
@@ -1175,7 +1169,6 @@ _git_clone ()
11751169
return
11761170
;;
11771171
esac
1178-
COMPREPLY=()
11791172
}
11801173

11811174
_git_commit ()
@@ -1359,7 +1352,6 @@ _git_fsck ()
13591352
return
13601353
;;
13611354
esac
1362-
COMPREPLY=()
13631355
}
13641356

13651357
_git_gc ()
@@ -1370,7 +1362,6 @@ _git_gc ()
13701362
return
13711363
;;
13721364
esac
1373-
COMPREPLY=()
13741365
}
13751366

13761367
_git_gitk ()
@@ -1447,7 +1438,6 @@ _git_init ()
14471438
return
14481439
;;
14491440
esac
1450-
COMPREPLY=()
14511441
}
14521442

14531443
_git_ls_files ()
@@ -1583,7 +1573,6 @@ _git_mergetool ()
15831573
return
15841574
;;
15851575
esac
1586-
COMPREPLY=()
15871576
}
15881577

15891578
_git_merge_base ()
@@ -1896,7 +1885,6 @@ _git_config ()
18961885
return
18971886
;;
18981887
*.*)
1899-
COMPREPLY=()
19001888
return
19011889
;;
19021890
esac
@@ -2277,7 +2265,6 @@ _git_remote ()
22772265
__gitcomp "$c"
22782266
;;
22792267
*)
2280-
COMPREPLY=()
22812268
;;
22822269
esac
22832270
}
@@ -2393,8 +2380,6 @@ _git_stash ()
23932380
*)
23942381
if [ -z "$(__git_find_on_cmdline "$save_opts")" ]; then
23952382
__gitcomp "$subcommands"
2396-
else
2397-
COMPREPLY=()
23982383
fi
23992384
;;
24002385
esac
@@ -2407,14 +2392,12 @@ _git_stash ()
24072392
__gitcomp "--index --quiet"
24082393
;;
24092394
show,--*|drop,--*|branch,--*)
2410-
COMPREPLY=()
24112395
;;
24122396
show,*|apply,*|drop,*|pop,*|branch,*)
24132397
__gitcomp_nl "$(git --git-dir="$(__gitdir)" stash list \
24142398
| sed -n -e 's/:.*//p')"
24152399
;;
24162400
*)
2417-
COMPREPLY=()
24182401
;;
24192402
esac
24202403
fi
@@ -2531,7 +2514,6 @@ _git_svn ()
25312514
__gitcomp "--revision= --parent"
25322515
;;
25332516
*)
2534-
COMPREPLY=()
25352517
;;
25362518
esac
25372519
fi
@@ -2556,13 +2538,10 @@ _git_tag ()
25562538

25572539
case "$prev" in
25582540
-m|-F)
2559-
COMPREPLY=()
25602541
;;
25612542
-*|tag)
25622543
if [ $f = 1 ]; then
25632544
__gitcomp_nl "$(__git_tags)"
2564-
else
2565-
COMPREPLY=()
25662545
fi
25672546
;;
25682547
*)

0 commit comments

Comments
 (0)