From: Gerrit Pape Date: Wed, 02 Sep 2009 09:58:43 GMT Subject: [PATCH] git-completion.bash: prevent 'git help' from searching for git repository Message-ID: <20090902095843.28914.qmail@3cd9dde586d86b.315fe32.mid.smarden.org> On 'git ' the bash completion runs 'git help -a'. Since 'git help' actually doesn't need to be run inside a git repository, this commit uses the option --git-dir=/nonexistent to prevent it from searching a git directory. Unnecessary searching for a git directory can be annoying in auto-mount environments. The annoying behavior and suggested fix has been reported by Vincent Danjean through http://bugs.debian.org/539273 Signed-off-by: Gerrit Pape --- contrib/completion/git-completion.bash | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index bf688e1..d51854a 100755 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -500,7 +500,7 @@ __git_all_commands () return fi local i IFS=" "$'\n' - for i in $(git help -a|egrep '^ ') + for i in $(git --git-dir=/nonexistent help -a|egrep '^ ') do case $i in *--*) : helper pattern;; -- 1.6.0.3