Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'ma/bash-completion-leaking-x'
author
Junio C Hamano
<gitster@pobox.com>
Mon, 20 Apr 2015 22:28:29 +0000
(15:28 -0700)
committer
Junio C Hamano
<gitster@pobox.com>
Mon, 20 Apr 2015 22:28:30 +0000
(15:28 -0700)
The completion script (in contrib/) contaminated global namespace
and clobbered on a shell variable $x.
* ma/bash-completion-leaking-x:
completion: fix global bash variable leak on __gitcompappend
contrib/completion/git-completion.bash
patch
|
blob
|
history
raw
(from parent 1:
1eb0545
)
diff --git
a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index fbe597232c11c05c1b8f9c366232d52f050b8d51..5944c824abe9aa4dee8b63b0e91a047125722b22 100644
(file)
--- a/
contrib/completion/git-completion.bash
+++ b/
contrib/completion/git-completion.bash
@@
-186,7
+186,7
@@
fi
__gitcompappend ()
{
- local i=${#COMPREPLY[@]}
+ local
x
i=${#COMPREPLY[@]}
for x in $1; do
if [[ "$x" == "$3"* ]]; then
COMPREPLY[i++]="$2$x$4"