summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Unix/Command/_git13
2 files changed, 10 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index 175912ff5..b7ae661f3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2008-08-16 Clint Adams <clint@zsh.org>
+ * 25457: Completion/Unix/Command/_git: improvements for git diff
+ and git log.
+
* Mikael Magnusson: 25456: Completion/Unix/Command/_git: fix typo
of "before".
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index ac08dd3d2..3dc973ac6 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1597,9 +1597,10 @@ _git-diff () {
_arguments -S \
$diff_args \
'--cached[show diff between index and named commit]' \
- '::original revision:__git_commits' \
- '::new revision:__git_commits' \
- '*::index file:__git_modified_files' && ret=0
+ '::commit range:__git_commit_ranges' \
+ '::original revision:__git_objects' \
+ '::new revision:__git_objects' \
+ '*::index file:__git_files' && ret=0
}
(( $+functions[_git-fetch] )) ||
@@ -1727,9 +1728,9 @@ _git-log () {
case $state in
(files)
- _alternative \
- 'files:index file:__git_cached_files' \
- 'branches:branch:__git_branch_names' && ret=0
+ _arguments -S \
+ '::index file:__git_cached_files' \
+ '*::branch:__git_commit_ranges' && ret=0
;;
esac
}