about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Unix/Command/_git2
1 files changed, 1 insertions, 1 deletions
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index e76f7cc24..71d006074 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2655,7 +2655,7 @@ __git_tree_files () {
   integer at_least_one_tree_added
   local -a tree_files
 
-  Path=${1:h}/
+  [[ "$1" == */ ]] && Path="$1" || Path="${1:h}/"
   shift
   (( at_least_one_tree_added = 0 ))
   for tree in $*; do