summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rw-r--r--Completion/Unix/Command/_git2
2 files changed, 3 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 6936d137e..8450407c8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2016-09-30  Oliver Kiddle  <opk@zsh.org>
 
+	* 39514: Completion/Unix/Command/_git: handle --git-dir
+
 	* 39513: Completion/Unix/Command/_doas: new doas completion
 
 	* 39464: Completion/Solaris/Command/_fmadm: fix where lack
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index a00e1d7ac..80b2c55af 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -7484,7 +7484,7 @@ _git() {
         ;;
       (option-or-argument)
         curcontext=${curcontext%:*:*}:git-$words[1]:
-
+	(( $+opt_args[--git-dir] )) && local -x GIT_DIR=$opt_args[--git-dir]
 	if ! _call_function ret _git-$words[1]; then
 	  if zstyle -T :completion:$curcontext: use-fallback; then
 	    _default && ret=0