about summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_git3
1 files changed, 1 insertions, 2 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index dfb96558a..3a365e528 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2627,8 +2627,7 @@ __git_unmerged_files () {
 #this is for git-commit which can take files both git-added and not
 (( $+functions[__git_changed_files] )) ||
 __git_changed_files () {
-  gitdir=$(_call_program gitdir git rev-parse --git-dir 2>/dev/null)
-  __git_command_successful || return
+  local -a files
 
   files=(${(ps:\0:)"$(_call_program files git diff-index -z --name-only HEAD 2>/dev/null)"})
   __git_command_successful || return