summary refs log tree commit diff
diff options
context:
space:
mode:
authorDaniel Shahaf <d.s@daniel.shahaf.name>2015-08-18 04:26:48 +0000
committerDaniel Shahaf <d.s@daniel.shahaf.name>2015-08-19 23:28:12 +0000
commita4c41fff1261c4c0251fe969e7684c582160f93a (patch)
tree410753e0c29a863db6cce34eff4f883ab5d13086
parentd70e7149df96e94e747ea3ed9ae6787f5a04d8b5 (diff)
downloadzsh-a4c41fff1261c4c0251fe969e7684c582160f93a.tar.gz
zsh-a4c41fff1261c4c0251fe969e7684c582160f93a.tar.xz
zsh-a4c41fff1261c4c0251fe969e7684c582160f93a.zip
36236: _git-log: Complete multiple revspecs
e.g., git log origin/master origin/foo origin/bar
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_git5
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 3e361c5a7..ad64ca2df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2015-08-19  Daniel Shahaf  <d.s@daniel.shahaf.name>
 
+	* 36236: Completion/Unix/Command/_git: _git-log: Complete
+	multiple revspecs
+
 	* 36236: Completion/Unix/Command/_git: _git-log: complete
 	'git rm'd files
 
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index df9375ff4..fc9d7ce9f 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1101,6 +1101,11 @@ _git-log () {
       fi
     ;;
     (commit-ranges-or-files)
+      # Multiple revspecs are permitted.
+      if [[ -z ${opt_args[(I)--]} ]]; then
+        __git_commit_ranges "$@" && ret=0
+      fi
+
       # TODO: Write a wrapper function that checks whether we have a
       # committish range or comittish and calls __git_tree_files
       # appropriately.