summary refs log tree commit diff
path: root/Completion/Unix/Command/_git
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2015-08-19 21:18:08 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2015-08-19 23:29:50 +0000
commita69994ede1ce9ba608e8deedad548b95235053c5 (patch)
treea7d780e898076291ec015252712b0050d209443b /Completion/Unix/Command/_git
parent663fa4092fcc492e49fbf4d396d0b5b0a2325a48 (diff)
downloadzsh-a69994ede1ce9ba608e8deedad548b95235053c5.tar.gz
zsh-a69994ede1ce9ba608e8deedad548b95235053c5.tar.xz
zsh-a69994ede1ce9ba608e8deedad548b95235053c5.zip
36247: __git_objects: Complete HEAD:./foo correctly in worktree subdir
Diffstat (limited to 'Completion/Unix/Command/_git')
-rw-r--r--Completion/Unix/Command/_git6
1 files changed, 5 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index e1a38e935..0d705a9da 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -5740,7 +5740,11 @@ __git_tree_ishs () {
 __git_objects () {
   compset -P '*:'
   if [[ -n $IPREFIX ]]; then
-    __git_tree_files --root-relative "$PREFIX" "${IPREFIX%:}"
+    if compset -P ./ ; then
+      __git_tree_files                 "$PREFIX" "${IPREFIX%:./}"
+    else
+      __git_tree_files --root-relative "$PREFIX" "${IPREFIX%:}"
+    fi
   else
     _alternative \
       'revisions::__git_revisions' \