completion: small optimization
commitddc996d767025a4ffcb52a813d32a5095f357e44
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 10 Apr 2013 06:57:57 +0000 (10 01:57 -0500)
committerJunio C Hamano <gitster@pobox.com>
Mon, 15 Apr 2013 06:18:58 +0000 (14 23:18 -0700)
tree20e970bd65b82eada4e559a47d72a18813c58bd5
parentb4cfbc969cd910992a08b12dc612d19323668e09
completion: small optimization

No need to calculate a new $c with a space if we are not going to do
anything it with it.

There should be no functional changes, except that a word "foo " with no
suffixes can't be matched. But $cur cannot have a space at the end
anyway. So it's safe.

Based on the code from SZEDER Gábor.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash