zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _git describe + fixups for diff-index, diff-files, diff-stages, diff-tree
@ 2007-06-28 15:21 Clint Adams
  2007-06-28 16:42 ` Nikolai Weibull
  0 siblings, 1 reply; 3+ messages in thread
From: Clint Adams @ 2007-06-28 15:21 UTC (permalink / raw)
  To: zsh-workers

More merging from http://git.bitwi.se/?p=dot-home.git

Index: Completion/Unix/Command/_git
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_git,v
retrieving revision 1.8
diff -u -r1.8 _git
--- Completion/Unix/Command/_git	28 Jun 2007 15:02:14 -0000	1.8
+++ Completion/Unix/Command/_git	28 Jun 2007 15:19:38 -0000
@@ -1,4 +1,4 @@
-#compdef git git-annotate git-apply git-checkout-index git-clean git-commit-tree git-hash-object git-index-pack git-init-db git-merge-index git-mktag git-pack-objects git-prune-packed git-read-tree git-unpack-objects git-update-index git-write-tree git-cat-file git-diff-index git-diff-files git-diff-stages git-diff-tree git-fsck-objects git-ls-files git-ls-tree git-merge-base git-name-rev git-rev-list git-show-index git-tar-tree git-unpack-file git-var git-verify-pack git-clone-pack git-fetch-pack git-http-fetch git-local-fetch git-peek-remote git-receive-pack git-send-pack git-ssh-fetch git-ssh-upload git-update-server-info git-upload-pack git-add git-am git-applymbox git-bisect git-branch git-checkout git-cherry-pick git-clone git-commit git-diff git-fetch git-format-patch git-grep git-log git-ls-remote git-merge git-mv git-octopus git-pull git-push git-rebase git-repack git-reset git-resolve git-revert git-shortlog git-show-branch git-status git-verify-tag git-whatchanged git-applypatch git-archimport git-archive git-convert-objects git-cvsimport git-lost-found git-merge-one-file git-prune git-relink git-svnimport git-symbolic-ref git-tag git-update-ref git-check-ref-format git-cherry git-count-objects git-daemon git-get-tar-commit-id git-mailinfo git-mailsplit git-patch-id git-request-pull git-send-email git-stripspace
+#compdef git git-annotate git-apply git-checkout-index git-clean git-commit-tree git-describe git-hash-object git-index-pack git-init-db git-merge-index git-mktag git-pack-objects git-prune-packed git-read-tree git-unpack-objects git-update-index git-write-tree git-cat-file git-diff-index git-diff-files git-diff-stages git-diff-tree git-fsck-objects git-ls-files git-ls-tree git-merge-base git-name-rev git-rev-list git-show-index git-tar-tree git-unpack-file git-var git-verify-pack git-clone-pack git-fetch-pack git-http-fetch git-local-fetch git-peek-remote git-receive-pack git-send-pack git-ssh-fetch git-ssh-upload git-update-server-info git-upload-pack git-add git-am git-applymbox git-bisect git-branch git-checkout git-cherry-pick git-clone git-commit git-diff git-fetch git-format-patch git-grep git-log git-ls-remote git-merge git-mv git-octopus git-pull git-push git-rebase git-repack git-reset git-resolve git-revert git-shortlog git-show-branch git-status git-verify-tag git-whatchanged git-applypatch git-archimport git-archive git-convert-objects git-cvsimport git-lost-found git-merge-one-file git-prune git-relink git-svnimport git-symbolic-ref git-tag git-update-ref git-check-ref-format git-cherry git-count-objects git-daemon git-get-tar-commit-id git-mailinfo git-mailsplit git-patch-id git-request-pull git-send-email git-stripspace
 
 # Commands not completed:
 # git-sh-setup
@@ -396,20 +396,36 @@
   fi
 }
 
+_git-describe () {
+  _arguments \
+    $abbrev_arg \
+    '--all[use any ref found in "$GIT_DIR/refs/"]' \
+    '--tags[use any tag found in "$GIT_DIR/refs/tags/"]' \
+    $abbrev_arg \
+    '--candidates=-[consider up to given number of canditates]: :_guard "[[\:digit\:]]##" "number of canditates"' \
+    '--debug[display information about the searching strategy]' \
+    '*:committish:__git_committishs' && ret=0
+}
+
 _git-diff-index () {
   _arguments -S \
     $diff_args \
     '--cached[do not consider the work tree at all]' \
     '-m[flag non-checked-out files as up-to-date]' \
     ':tree-ish:__git_tree_ishs' \
-    '*:index file:__git_files' && ret=0
+    '*::index file:__git_cached_files' && ret=0
 }
 
 _git-diff-files () {
   _arguments \
     $diff_args \
-    '-q[do not complain about nonexisting files]' \
-    '*:file:_files' && ret=0
+    '(-0 -1 -2 -3 --base --ours --theirs -c --cc)-0[omit diff output for unmerged entries]' \
+    '(-0 -1 -2 -3 --base --ours --theirs -c --cc)'{-1,--base}'[diff against "base" version]' \
+    '(-0 -1 -2 -3 --base --ours --theirs -c --cc)'{-2,--ours}'[diff against "our branch" version]' \
+    '(-0 -1 -2 -3 --base --ours --theirs -c --cc)'{-3,--theirs}'[diff against "their branch" version]' \
+    '(-0 -1 -2 -3 --base --ours --theirs -c --cc)'{-c,--cc}'[compare "our branch", "their branch" and working tree files]' \
+    '-q[remain silent even on nonexisting files]' \
+    '*::file:_files' && ret=0
 }
 
 _git-diff-stages () {
@@ -417,23 +433,27 @@
     $diff_args \
     ':stage 1:__git_stages' \
     ':stage 2:__git_stages' \
-    '*:index file:__git_files' && ret=0
+    '*::index file:_files' && ret=0
 }
 
 _git-diff-tree () {
   local curcontext=$curcontext state line
   typeset -A opt_args
 
-  _arguments -S \
+  _arguments -C -S \
     $diff_args \
     $pretty_arg \
     '--no-commit-id[skip output of commit IDs]' \
     '--root[show diff against the empty tree]' \
     '--stdin[read commit and tree information from standard input]' \
     '-m[show merge commits]' \
-    '-r[recurse into subdirectories]' \
-    '(-r)-t[show tree entry itself as well as subtrees (implies -r)]' \
-    '-v[show verbose headers]' \
+    '(-t)-r[recurse into subdirectories]' \
+    '-t[show tree entry itself as well as subtrees (implies -r)]' \
+    '-s[do not show differences]' \
+    '-v[show commit message before the differences]' \
+    '(-c --cc)-c[show differences from each of the parents to the merge result]' \
+    '(-c --cc)--cc[how differences from each of the parents and omit differences from only one parent]' \
+    '--always[always show commit itself and the commit log message]' \
     ':tree-ish:__git_tree_ishs' \
     '*::file:->files' && ret=0
 
@@ -1380,6 +1400,10 @@
     'tags::__git_tags'
 }
 
+__git_committishs () {
+  __git_commits
+}
+
 # TODO: deal with prefixes and suffixes listed in git-rev-parse
 __git_revisions () {
   __git_commits $*


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: _git describe + fixups for diff-index, diff-files, diff-stages, diff-tree
  2007-06-28 15:21 PATCH: _git describe + fixups for diff-index, diff-files, diff-stages, diff-tree Clint Adams
@ 2007-06-28 16:42 ` Nikolai Weibull
  2007-06-28 17:01   ` Clint Adams
  0 siblings, 1 reply; 3+ messages in thread
From: Nikolai Weibull @ 2007-06-28 16:42 UTC (permalink / raw)
  To: zsh-workers

On 6/28/07, Clint Adams <clint@zsh.org> wrote:
> More merging from http://git.bitwi.se/?p=dot-home.git

I'm almost done with the new version, which I will post here.  Most of
the stuff is at the repository above, so if you want to continue
merging partials that's fine.  Completion for git-svn has taken quite
some time to write, as it requires a lot of settings to be completed
as well.  Hopefully I'll be able to get a complete update ready this
weekend.

  nikolai


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: PATCH: _git describe + fixups for diff-index, diff-files, diff-stages, diff-tree
  2007-06-28 16:42 ` Nikolai Weibull
@ 2007-06-28 17:01   ` Clint Adams
  0 siblings, 0 replies; 3+ messages in thread
From: Clint Adams @ 2007-06-28 17:01 UTC (permalink / raw)
  To: Nikolai Weibull; +Cc: zsh-workers

On Thu, Jun 28, 2007 at 06:42:50PM +0200, Nikolai Weibull wrote:
> I'm almost done with the new version, which I will post here.  Most of
> the stuff is at the repository above, so if you want to continue
> merging partials that's fine.  Completion for git-svn has taken quite
> some time to write, as it requires a lot of settings to be completed
> as well.  Hopefully I'll be able to get a complete update ready this
> weekend.

I wish I could use git to do it, but something in the pre-sourceforge
CVS history confuses git-cvsimport, cvsps, tailor, and just about every 
other tool like that.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-06-28 17:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-28 15:21 PATCH: _git describe + fixups for diff-index, diff-files, diff-stages, diff-tree Clint Adams
2007-06-28 16:42 ` Nikolai Weibull
2007-06-28 17:01   ` Clint Adams

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).