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 <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Felipe Contreras committed
Apr 10, 2013 at 01:57 UTC
0285118e593833be90b3f025d70dde432c1859e7
1 file changed
-21
contrib/completion/git-completion.bash
-21
@@ -208,7 +208,6 @@ __gitcomp ()
208
209
case "$cur_" in
210
--*=)
211
- COMPREPLY=()
211
;;
212
*)
213
local IFS=$'\n'
@@ -614,7 +613,6 @@ __git_complete_remote_or_refspec ()
613
case "$cmd" in
614
push) no_complete_refspec=1 ;;
615
fetch)
617
- COMPREPLY=()
616
return
617
;;
618
*) ;;
@@ -630,7 +628,6 @@ __git_complete_remote_or_refspec ()
628
return
629
fi
630
if [ $no_complete_refspec = 1 ]; then
633
- COMPREPLY=()
631
return
632
fi
633
[ "$remote" = "." ] && remote=
@@ -951,7 +948,6 @@ _git_am ()
948
"
949
return
950
esac
954
- COMPREPLY=()
951
}
952
953
_git_apply ()
@@ -971,7 +967,6 @@ _git_apply ()
967
"
968
return
969
esac
974
- COMPREPLY=()
970
}
971
972
_git_add ()
@@ -1031,7 +1026,6 @@ _git_bisect ()
1026
__gitcomp_nl "$(__git_refs)"
1027
;;
1028
*)
1034
- COMPREPLY=()
1029
;;
1030
esac
1031
}
@@ -1175,7 +1169,6 @@ _git_clone ()
1169
return
1170
;;
1171
esac
1178
- COMPREPLY=()
1172
}
1173
1174
_git_commit ()
@@ -1359,7 +1352,6 @@ _git_fsck ()
1352
return
1353
;;
1354
esac
1362
- COMPREPLY=()
1355
}
1356
1357
_git_gc ()
@@ -1370,7 +1362,6 @@ _git_gc ()
1362
return
1363
;;
1364
esac
1373
- COMPREPLY=()
1365
}
1366
1367
_git_gitk ()
@@ -1447,7 +1438,6 @@ _git_init ()
1438
return
1439
;;
1440
esac
1450
- COMPREPLY=()
1441
}
1442
1443
_git_ls_files ()
@@ -1583,7 +1573,6 @@ _git_mergetool ()
1573
return
1574
;;
1575
esac
1586
- COMPREPLY=()
1576
}
1577
1578
_git_merge_base ()
@@ -1896,7 +1885,6 @@ _git_config ()
1885
return
1886
;;
1887
*.*)
1899
- COMPREPLY=()
1888
return
1889
;;
1890
esac
@@ -2277,7 +2265,6 @@ _git_remote ()
2265
__gitcomp "$c"
2266
;;
2267
*)
2280
- COMPREPLY=()
2268
;;
2269
esac
2270
}
@@ -2393,8 +2380,6 @@ _git_stash ()
2380
*)
2381
if [ -z "$(__git_find_on_cmdline "$save_opts")" ]; then
2382
__gitcomp "$subcommands"
2396
- else
2397
- COMPREPLY=()
2383
fi
2384
;;
2385
esac
@@ -2407,14 +2392,12 @@ _git_stash ()
2392
__gitcomp "--index --quiet"
2393
;;
2394
show,--*|drop,--*|branch,--*)
2410
- COMPREPLY=()
2395
;;
2396
show,*|apply,*|drop,*|pop,*|branch,*)
2397
__gitcomp_nl "$(git --git-dir="$(__gitdir)" stash list \
2398
| sed -n -e 's/:.*//p')"
2399
;;
2400
*)
2417
- COMPREPLY=()
2401
;;
2402
esac
2403
fi
@@ -2531,7 +2514,6 @@ _git_svn ()
2514
__gitcomp "--revision= --parent"
2515
;;
2516
*)
2534
- COMPREPLY=()
2517
;;
2518
esac
2519
fi
@@ -2556,13 +2538,10 @@ _git_tag ()
2538
2539
case "$prev" in
2540
-m|-F)
2559
- COMPREPLY=()
2541
;;
2542
-*|tag)
2543
if [ $f = 1 ]; then
2544
__gitcomp_nl "$(__git_tags)"
2564
- else
2565
- COMPREPLY=()
2545
fi
2546
;;
2547
*)