From a008a5e057445c05709f827d7ee01ddccad24026 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Mon, 22 Dec 2008 12:24:17 +0100 Subject: __git_files: Return if gitdir is empty (->no git repo) --- etc/completions/__git_files | 2 ++ 1 file changed, 2 insertions(+) (limited to 'etc/completions') diff --git a/etc/completions/__git_files b/etc/completions/__git_files index 6b8c1dd..ef14c31 100644 --- a/etc/completions/__git_files +++ b/etc/completions/__git_files @@ -12,6 +12,8 @@ ls_opts=("--exclude-per-directory=.gitignore") files=(${(ps:\0:)"$(cd $gitdir/..; _call_program files git ls-files -z $ls_opts $opts 2>/dev/null)"}) __git_command_successful || return +[[ -n $gitdir ]] || return + if [[ ! -d .git ]] { dirdiff=${PWD#${gitdir%/.git}} repeat ${#${(s:/:)dirdiff}}; do -- cgit v1.2.3