From: Gerrit Pape Date: Fri, 04 Sep 2009 09:29:29 GMT Subject: [PATCH 2/2] git-completion.bash: prevent 'git help' from searching for git repository Message-ID: <20090904092929.23208.qmail@00cf3567a0e8b4.315fe32.mid.smarden.org> In-Reply-To: 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 --no-git-dir option 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..a55e3cd 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 --no-git-dir help -a|egrep '^ ') do case $i in *--*) : helper pattern;; -- 1.6.0.3