From a69994ede1ce9ba608e8deedad548b95235053c5 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Wed, 19 Aug 2015 21:18:08 +0000 Subject: 36247: __git_objects: Complete HEAD:./foo correctly in worktree subdir --- ChangeLog | 3 +++ Completion/Unix/Command/_git | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 7479cfe6c..73dc3d5ce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2015-08-19 Daniel Shahaf + * 36247: Completion/Unix/Command/_git: __git_objects: Complete + HEAD:./foo correctly in worktree subdir + * 36237: Completion/Unix/Command/_git: __git_objects: Complete HEAD:foo correctly in worktree subdir 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' \ -- cgit 1.4.1