summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--Completion/Unix/Command/_git5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 83a27f454..9ad26b720 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2017-02-07  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 40494: Completion/Unix/Command/_git: Use slashes matchspec
+	for references (as already used for branch names).
+
+2017-02-07  Daniel Shahaf  <d.s@daniel.shahaf.name>
+
 	* 40493/0002: Completion/Unix/Command/_git: _git-checkout:
 	Reorder default completions.
 
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index b16d2bc4c..684eb21d0 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -6481,9 +6481,10 @@ __git_references () {
     _git_refs_cache_pwd=$PWD
   fi
 
-  _wanted references expl 'reference' compadd -a - _git_refs_cache
+  _wanted references expl 'reference' compadd -M 'r:|/=**' -a - _git_refs_cache
 }
 
+# ### currently unused; are some callers of __git_references supposed to call this function?
 (( $+functions[__git_local_references] )) ||
 __git_local_references () {
   local expl
@@ -6494,7 +6495,7 @@ __git_local_references () {
     _git_local_refs_cache_pwd=$PWD
   fi
 
-  _wanted references expl 'reference' compadd -a - _git_local_refs_cache
+  _wanted references expl 'reference' compadd -M 'r:|/=**' -a - _git_local_refs_cache
 }
 
 (( $+functions[__git_remote_references] )) ||