zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] Updates to git completion
@ 2009-01-29 12:21 Ingmar Vanhassel
  2009-01-29 12:21 ` [PATCH] Add "git remote rename" completion Ingmar Vanhassel
  2009-01-29 14:36 ` [PATCH] Updates to git completion Richard Hartmann
  0 siblings, 2 replies; 16+ messages in thread
From: Ingmar Vanhassel @ 2009-01-29 12:21 UTC (permalink / raw)
  To: Zsh Hackers' List


I've started working on updating the git completion for command line
changes in git 1.6.0 & newer.

Here are some initial patches. Comments & reviews really welcome, these are my
first zsh patches. :)

More to follow,
Ingmar


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

* [PATCH] Add "git remote rename" completion.
  2009-01-29 12:21 [PATCH] Updates to git completion Ingmar Vanhassel
@ 2009-01-29 12:21 ` Ingmar Vanhassel
  2009-01-29 12:21   ` [PATCH] Add "git describe --tags" completion. Fix typos Ingmar Vanhassel
  2009-01-29 14:36 ` [PATCH] Updates to git completion Richard Hartmann
  1 sibling, 1 reply; 16+ messages in thread
From: Ingmar Vanhassel @ 2009-01-29 12:21 UTC (permalink / raw)
  To: Zsh Hackers' List; +Cc: Ingmar Vanhassel

---
 Completion/Unix/Command/_git |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index d5de414..7e6a174 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -665,7 +665,8 @@ _git-remote () {
         'show:show information about a given remote'
         'prune:delete all stale tracking branches for a given remote'
         'update:fetch updates for a set of remotes'
-        'rm:remove a remote from .git/config and all associated tracking branches')
+        'rm:remove a remote from .git/config and all associated tracking branches'
+        'rename:rename a remote from .git/config and update all associated tracking branches')
 
       _describe -t commands 'sub-command' commands && ret=0
       ;;
@@ -694,6 +695,10 @@ _git-remote () {
           ;;
         (rm)
           __git_remotes && ret=0
+          ;;
+        (rename)
+          __git_remotes && ret=0
+          ;;
       esac
       ;;
   esac
-- 
1.6.0.1


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

* [PATCH] Add "git describe --tags" completion. Fix typos.
  2009-01-29 12:21 ` [PATCH] Add "git remote rename" completion Ingmar Vanhassel
@ 2009-01-29 12:21   ` Ingmar Vanhassel
  2009-01-29 12:21     ` [PATCH] Complete "git add --intent-to-add" Ingmar Vanhassel
  0 siblings, 1 reply; 16+ messages in thread
From: Ingmar Vanhassel @ 2009-01-29 12:21 UTC (permalink / raw)
  To: Zsh Hackers' List; +Cc: Ingmar Vanhassel

---
 Completion/Unix/Command/_git |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 7e6a174..9f758ec 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -769,14 +769,15 @@ _git-cat-file () {
 _git-describe () {
   _arguments \
     '--all[use any ref found in "$GIT_DIR/refs/"]' \
+    '--tags[use any ref found in "$GIT_DIR/refs/tags"]' \
     '(--contains)--tags[use any tag found in "$GIT_DIR/refs/tags/"]' \
     $abbrev_arg \
     '--contains[find the tag after the commit instead of before]' \
-    '--exact-match[only output exact matches, same as --canditates=0]' \
+    '--exact-match[only output exact matches, same as --candidates=0]' \
     '--always[show uniquely abbreviated commit object as fallback]' \
     '--long[always show full format, even for exact matches]' \
     '--match=[only consider tags matching glob pattern]:pattern' \
-    '--candidates=-[consider up to given number of canditates]: :_guard "[[\:digit\:]]##" "number of canditates"' \
+    '--candidates=-[consider up to given number of candidates]: :_guard "[[\:digit\:]]##" "number of candidates"' \
     '--debug[display information about the searching strategy]' \
     '*:committish:__git_committishs' && ret=0
 }
-- 
1.6.0.1


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

* [PATCH] Complete "git add --intent-to-add".
  2009-01-29 12:21   ` [PATCH] Add "git describe --tags" completion. Fix typos Ingmar Vanhassel
@ 2009-01-29 12:21     ` Ingmar Vanhassel
  2009-01-29 12:21       ` [PATCH] "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached Ingmar Vanhassel
  0 siblings, 1 reply; 16+ messages in thread
From: Ingmar Vanhassel @ 2009-01-29 12:21 UTC (permalink / raw)
  To: Zsh Hackers' List; +Cc: Ingmar Vanhassel

---
 Completion/Unix/Command/_git |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 9f758ec..79c08f6 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1328,6 +1328,7 @@ _git-add () {
     '(-p --patch : -)'{-p,--patch}'[like -i but go directly into patch mode for specified files]' \
     '(-u --update)'{-u,--update}'[update only files git already knows about]' \
     '(-A --all)'{-A,--all}'[act as both add . and add -u]' \
+    '(-N --intent-to-add)'{-N,--intent-to-add}'[record only that the path will be added later]' \
     '--refresh[do not add files, but refresh their stat() info in the index]' \
     '--ignore-errors[continue adding if an error occurs]' \
     '*:file:->files' && ret=0
-- 
1.6.0.1


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

* [PATCH] "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached.
  2009-01-29 12:21     ` [PATCH] Complete "git add --intent-to-add" Ingmar Vanhassel
@ 2009-01-29 12:21       ` Ingmar Vanhassel
  2009-01-29 12:21         ` [PATCH] Complete "git clone --verbose" Ingmar Vanhassel
  2009-01-29 14:33         ` [PATCH] "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached Richard Hartmann
  0 siblings, 2 replies; 16+ messages in thread
From: Ingmar Vanhassel @ 2009-01-29 12:21 UTC (permalink / raw)
  To: Zsh Hackers' List; +Cc: Ingmar Vanhassel

---
 Completion/Unix/Command/_git |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 79c08f6..209fb97 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -178,6 +178,7 @@ _git_commands () {
     'revert:revert existing commit'
     'rm:remove files from the working tree and from the index'
     'show-branch:show branches and their commits'
+    'stage:add file contents to the staging area'
     'stash:stash away changes to the working tree'
     'status:show working-tree'\''s status'
     'tag:create tag object signed with GPG'
@@ -1351,6 +1352,11 @@ _git-add () {
 }
 __git_zstyle_default ':completion::complete:git-add:argument-rest:*' ignore-line yes
 
+(( $+functions[_git-stage] )) ||
+_git-stage () {
+  _git-add
+}
+
 (( $+functions[_git-am] )) ||
 _git-am () {
   _arguments \
@@ -1658,7 +1664,7 @@ __git_zstyle_default ':completion::complete:git-commit:argument-rest:*' ignore-l
 _git-diff () {
   _arguments -S \
     $diff_args \
-    '--cached[show diff between index and named commit]' \
+    '(--cached --staged)'{--cached,--staged}'[show diff between index and named commit]' \
     '::commit range:__git_commit_ranges' \
     '::original revision:__git_objects' \
     '::new revision:__git_objects' \
-- 
1.6.0.1


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

* [PATCH] Complete "git clone --verbose".
  2009-01-29 12:21       ` [PATCH] "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached Ingmar Vanhassel
@ 2009-01-29 12:21         ` Ingmar Vanhassel
  2009-01-29 12:21           ` [PATCH] Complete "git commit --cleanup=" and "git commit --allow-empty" Ingmar Vanhassel
  2009-01-29 14:33         ` [PATCH] "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached Richard Hartmann
  1 sibling, 1 reply; 16+ messages in thread
From: Ingmar Vanhassel @ 2009-01-29 12:21 UTC (permalink / raw)
  To: Zsh Hackers' List; +Cc: Ingmar Vanhassel

---
 Completion/Unix/Command/_git |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 209fb97..7649b21 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1620,10 +1620,11 @@ _git-clone () {
   _arguments -S \
     '--bare[make a bare GIT repository]' \
     '--mirror[clone refs into refs/* instead of refs/remotes/origin/*]' \
-    '(-l --local)'{-l,--local}'[perform a local cloning of a repository]' \
+    '(-l --local)'{-l,--local}'[clone locally, hardlink refs and objects if possible]' \
     '(-s --shared)'{-s,--shared}'[share the objects with the source repository (warning: see man page)]' \
     '--reference[reference repository]:repository:_directories' \
     '(-q --quiet)'{-q,--quiet}'[operate quietly]' \
+    '(-v --verbose)'{-v,--verbose}'[always display the progressbar]' \
     '(-n --no-checkout)'{-n,--no-checkout}'[do not checkout HEAD after clone is complete]' \
     '(-o --origin)'{-o,--origin}'[use given name instead of "origin" as branch name]:name:__git_guard_branch-name' \
     '--no-hardlinks[copy files instead of hardlinking when doing a local clone]' \
-- 
1.6.0.1


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

* [PATCH] Complete "git commit --cleanup=" and "git commit --allow-empty".
  2009-01-29 12:21         ` [PATCH] Complete "git clone --verbose" Ingmar Vanhassel
@ 2009-01-29 12:21           ` Ingmar Vanhassel
  2009-01-29 12:21             ` [PATCH] Update "git rebase" completions Ingmar Vanhassel
  0 siblings, 1 reply; 16+ messages in thread
From: Ingmar Vanhassel @ 2009-01-29 12:21 UTC (permalink / raw)
  To: Zsh Hackers' List; +Cc: Ingmar Vanhassel

---
 Completion/Unix/Command/_git |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 7649b21..cf69ce8 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1638,8 +1638,13 @@ _git-clone () {
 (( $+functions[_git-commit] )) ||
 _git-commit () {
   _arguments -S \
+    '--allow-empty[allow recording an empty commit]' \
     '(-a --all)'{-a,--all}'[update all paths in the index file]' \
     '--author[override the author name used in the commit]:author name' \
+    '--cleanup=-[specify how the commit message should be cleaned up]:mode:((verbatim\:"don'\''t change the commit message at all"
+                                                                             whitespace\:"remove leading and trailing whitespace lines"
+                                                                             strip\:"remove both whitespace and commentary lines"
+                                                                             default\:"act as '\''strip'\'' if the message is to be edited and as '\''whitespace'\'' otherwise"))' \
     '(-e --edit)'{-e,--edit}'[edit the commit message before committing]' \
     '(-o --only -i --include)'{-i,--include}'[update the given files and commit the whole index]' \
     '(-o --only -i --include)'{-o,--only}'[commit only the given files]' \
-- 
1.6.0.1


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

* [PATCH] Update "git rebase" completions.
  2009-01-29 12:21           ` [PATCH] Complete "git commit --cleanup=" and "git commit --allow-empty" Ingmar Vanhassel
@ 2009-01-29 12:21             ` Ingmar Vanhassel
  2009-01-29 12:21               ` [PATCH] Update "git svn" completion Ingmar Vanhassel
  0 siblings, 1 reply; 16+ messages in thread
From: Ingmar Vanhassel @ 2009-01-29 12:21 UTC (permalink / raw)
  To: Zsh Hackers' List; +Cc: Ingmar Vanhassel

---
 Completion/Unix/Command/_git |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index cf69ce8..1097611 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -1887,8 +1887,10 @@ _git-rebase () {
       '(-m --merge)'{-m,--merge}'[use merging strategies to rebase]' \
       '*'{-s,--strategy=-}'[use given merge strategy]:merge strategy:__git_merge_strategies' \
       $verbose_arg \
+      '--no-verify[bypass the pre-rebase hook]' \
       '-C-[ensure that given lines of surrounding context match]: :_guard "[[\:digit\:]]##" "lines of context"' \
       '(-i --interactive)'{-i,--interactive}'[make a list of commits to be rebased and open in $EDITOR]' \
+      '(-p --preserve-merges)'{-p,--preserve-merges}'[try to recreate merges instead of ignoring them]' \
       ':upstream branch:__git_revisions' \
       '::working branch:__git_revisions' && ret=0
   fi
-- 
1.6.0.1


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

* [PATCH] Update "git svn" completion.
  2009-01-29 12:21             ` [PATCH] Update "git rebase" completions Ingmar Vanhassel
@ 2009-01-29 12:21               ` Ingmar Vanhassel
  0 siblings, 0 replies; 16+ messages in thread
From: Ingmar Vanhassel @ 2009-01-29 12:21 UTC (permalink / raw)
  To: Zsh Hackers' List; +Cc: Ingmar Vanhassel

---
 Completion/Unix/Command/_git |   44 +++++++++++++++++++++++++++--------------
 1 files changed, 29 insertions(+), 15 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 1097611..f08c35d 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2466,8 +2466,6 @@ _git-send-email () {
     '*:file:_files' && ret=0
 }
 
-# TODO: -h, -H, and --help are undocumented.
-# TODO: -V and --version are undocumented.
 # TODO: --minimize-connections is undocumented.
 # TODO: --remote is undocumented.
 # TODO: --log-window-size is undocumented.
@@ -2480,7 +2478,6 @@ _git-send-email () {
 # TODO: migrate is undocumented.
 # TODO: --minimize for migrate is undocumented.
 # TODO: -r, --color, --pager, and --non-recursive for log are undocumented.
-# TODO: --local for rebase is undocumented.
 # TODO: --message, -m, --file, -F, --revision, and -r for commit-diff are
 # undocumented.
 (( $+functions[_git-svn] )) ||
@@ -2504,11 +2501,19 @@ _git-svn () {
         'clone:same as init, followed by fetch'
         'rebase:fetch revs from SVN parent of HEAD and rebase current work on it'
         'dcommit:commit diffs from given head onto SVN repository'
+        'branch:create a branch in the SVN repository'
+        'tag:create a tag in the SVN repository'
         'log:output SVN log-messages'
+        'blame:show what revision and author last modified each line of a file:'
         'find-rev:output git commit corresponding to the given SVN revision'\''s hash'
         'set-tree:commit given commit or tree to SVN repository'
-        'show-ignore:output corresponding .gitignore file of svn:ignore'
-        'commit-diff:commit diff of two tree-ishs')
+        'create-ignore:recursively finds the svn:ignore property and creates .gitignore files'
+        'show-ignore:output corresponding toplevel .gitignore file of svn:ignore'
+        'commit-diff:commit diff of two tree-ishs'
+        'info:show information about a file or directory'
+        'proplist:list the SVN properties stored for a file or directory'
+        'propget:get a given SVN property for a file'
+        'show-externals:show the subversion externals')
         _describe -t commands command commands && ret=0
       ;;
     (options)
@@ -2546,10 +2551,13 @@ _git-svn () {
           '(-T --trunk)'{-T-,--trunk=}'[set trunk sub-directory]:trunk sub-directory:->subdirectory'
           '(-t --tags)'{-t-,--tags=}'[set tags sub-directory]:tags sub-directory:->subdirectory'
           '(-b --branches)'{-b-,--branches=}'[set branches sub-directory]:branches sub-directory:->subdirectory'
+          '--stdlayout[shorthand for setting trunk,tags,branches as relative paths, the SVN default]'
           '--no-metadata[set svn-remote.X.noMetadata]'
           '--use-svm-props[set svn-remote.X.useSvmProps]'
           '--use-svnsync-props[set svn-remote.X.useSvnsyncProps]'
           '--rewrite-root=[set svn-remote.X.rewriteRoot]:new root'
+          '--use-log-author[use author from the first From: or Signed-Off-By: line, when fetching into git]'
+          '--add-author-from[when committing to svn, append a From: line based on the git commit'\''s author string]'
           '--prefix=[prefix to use for names of remotes]:path prefix:_directories -r ""')
       fi
 
@@ -2562,8 +2570,7 @@ _git-svn () {
           '(-C --copy-similarity)'{-C-,--copy-similarity=}'[undocumented]:number')
       fi
 
-      # FIXME: What arguments does clone actually take here?
-      if [[ $line[1] == (fetch|clone) ]]; then
+      if [[ $line[1] == (fetch|clone|log|create-ignore|info|propget|proplist|show-externals) ]]; then
         arguments+=(
           '(-r --revision)'{-r,--revision}'[only fetch given revision or revision range]:revision:->__git_svn_revisions'
           '::svn remote:__git_svn-remotes')
@@ -2571,7 +2578,8 @@ _git-svn () {
 
       if [[ $line[1] == (dcommit|rebase) ]]; then
         arguments+=(
-          '(-m --merge)'{-m,--merge}'[use merging strategies, if necessary]')
+          '(-m --merge)'{-m,--merge}'[use merging strategies, if necessary]'
+          '*'{-s,--strategy=-}'[use given merge strategy]:merge strategy:__git_merge_strategies')
       fi
 
       if [[ $line[1] == (fetch|dcommit|rebase) ]]; then
@@ -2579,11 +2587,6 @@ _git-svn () {
           '(--fetch-all --all)'{--fetch-all,--all}'[undocumented]')
       fi
 
-      if [[ $line[1] == (dcommit|rebase) ]]; then
-        arguments+=(
-            '*'{-s,--strategy=-}'[use given merge strategy]:merge strategy:__git_merge_strategies')
-      fi
-
       if [[ $line[1] == (dcommit|log|rebase) ]]; then
         arguments+=(
           '(-v --verbose)'{-v,--verbose}'[output extra information]')
@@ -2603,7 +2606,14 @@ _git-svn () {
           ;;
         (dcommit)
           arguments+=(
-            '(-n --dry-run)'{-n,--dry-run}'[output git-commands that would show diffs that would be committed]')
+            '(-n --dry-run)'{-n,--dry-run}'[output git-commands that would show diffs that would be committed]'
+            '--no-rebase[do not rebase or reset after committing]'
+            '--commit-url[commit to a different SVN url]:SVN URL:_url')
+          ;;
+        (branch)
+          arguments+=(
+            '(-m --message)'{-m,--message}'[specify the commit message]:message'
+            '(-t --tag)'{-t,--tag}'[create a tag]')
           ;;
         (migrate)
           arguments+=(
@@ -2623,9 +2633,13 @@ _git-svn () {
             '--pager[undocumented]:pager:_files -g *(*)'
             '--non-recursive[undocumented]')
           ;;
+        (blame)
+          arguments+=(
+            '--git-format[produce output in git-blame format, with SVN revision numbers instead of git commit hashes]')
+          ;;
         (rebase)
           arguments+=(
-            '--local[undocumented]')
+            '--local[do not fetch remotely, rebase against the last fetched commit from SVN]')
           ;;
         (commit-diff)
           arguments+=(
-- 
1.6.0.1


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

* Re: [PATCH] "git stage" is now a synonym for "git add". git diff:  --staged is a synonym for --cached.
  2009-01-29 12:21       ` [PATCH] "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached Ingmar Vanhassel
  2009-01-29 12:21         ` [PATCH] Complete "git clone --verbose" Ingmar Vanhassel
@ 2009-01-29 14:33         ` Richard Hartmann
  1 sibling, 0 replies; 16+ messages in thread
From: Richard Hartmann @ 2009-01-29 14:33 UTC (permalink / raw)
  To: Ingmar Vanhassel; +Cc: Zsh Hackers' List

On Thu, Jan 29, 2009 at 13:21, Ingmar Vanhassel <ingmar@exherbo.org> wrote:

> [...]

If it is a synonym _now_, maybe you should check the version to determine
which behaviour is correct.


Richard


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

* Re: [PATCH] Updates to git completion
  2009-01-29 12:21 [PATCH] Updates to git completion Ingmar Vanhassel
  2009-01-29 12:21 ` [PATCH] Add "git remote rename" completion Ingmar Vanhassel
@ 2009-01-29 14:36 ` Richard Hartmann
  2009-01-29 14:40   ` Mikael Magnusson
  1 sibling, 1 reply; 16+ messages in thread
From: Richard Hartmann @ 2009-01-29 14:36 UTC (permalink / raw)
  To: Ingmar Vanhassel; +Cc: Zsh Hackers' List

On Thu, Jan 29, 2009 at 13:21, Ingmar Vanhassel <ingmar@exherbo.org> wrote:

> I've started working on updating the git completion for command line
> changes in git 1.6.0 & newer.

Ah, sorry, I should have read all emails on this list before answering.

First of all: Thanks & welcome :)


If you are adding/changing things which are not valid for older versions
of git, you might want to check the git version and act depending on
that.
>From looking over the patches (_not_ trying them!), they seem to
make sense (provided that git has those options ;)


RIchard


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

* Re: [PATCH] Updates to git completion
  2009-01-29 14:36 ` [PATCH] Updates to git completion Richard Hartmann
@ 2009-01-29 14:40   ` Mikael Magnusson
  2009-01-29 15:07     ` Richard Hartmann
  2009-02-03 10:44     ` Doug Kearns
  0 siblings, 2 replies; 16+ messages in thread
From: Mikael Magnusson @ 2009-01-29 14:40 UTC (permalink / raw)
  To: Richard Hartmann; +Cc: Ingmar Vanhassel, Zsh Hackers' List

2009/1/29 Richard Hartmann <richih.mailinglist@gmail.com>:
> On Thu, Jan 29, 2009 at 13:21, Ingmar Vanhassel <ingmar@exherbo.org> wrote:
>
>> I've started working on updating the git completion for command line
>> changes in git 1.6.0 & newer.
>
> Ah, sorry, I should have read all emails on this list before answering.
>
> First of all: Thanks & welcome :)
>
>
> If you are adding/changing things which are not valid for older versions
> of git, you might want to check the git version and act depending on
> that.
> From looking over the patches (_not_ trying them!), they seem to
> make sense (provided that git has those options ;)

I think trying to complete options for the right versions for ~130
commands could make the
code just a bit convoluted and hard to follow. Not even git itself
documents when options
were introduced.

-- 
Mikael Magnusson


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

* Re: [PATCH] Updates to git completion
  2009-01-29 14:40   ` Mikael Magnusson
@ 2009-01-29 15:07     ` Richard Hartmann
  2009-01-29 15:18       ` Nikolai Weibull
  2009-02-03 10:44     ` Doug Kearns
  1 sibling, 1 reply; 16+ messages in thread
From: Richard Hartmann @ 2009-01-29 15:07 UTC (permalink / raw)
  To: Mikael Magnusson; +Cc: Ingmar Vanhassel, Zsh Hackers' List

On Thu, Jan 29, 2009 at 15:40, Mikael Magnusson <mikachu@gmail.com> wrote:

> I think trying to complete options for the right versions for ~130
> commands could make the
> code just a bit convoluted and hard to follow. Not even git itself
> documents when options
> were introduced.

Catch 22 :(


RIchard


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

* Re: [PATCH] Updates to git completion
  2009-01-29 15:07     ` Richard Hartmann
@ 2009-01-29 15:18       ` Nikolai Weibull
  2009-02-02 14:48         ` Allan Caffee
  0 siblings, 1 reply; 16+ messages in thread
From: Nikolai Weibull @ 2009-01-29 15:18 UTC (permalink / raw)
  To: Richard Hartmann
  Cc: Mikael Magnusson, Ingmar Vanhassel, Zsh Hackers' List

On Thu, Jan 29, 2009 at 16:07, Richard Hartmann
<richih.mailinglist@gmail.com> wrote:

> On Thu, Jan 29, 2009 at 15:40, Mikael Magnusson <mikachu@gmail.com> wrote:

>> I think trying to complete options for the right versions for ~130
>> commands could make the
>> code just a bit convoluted and hard to follow. Not even git itself
>> documents when options
>> were introduced.

> Catch 22 :(

Yeah, that's way to complicated and adds even more complexity to an
already complex code-base (I should know, I wrote the initial commit).
 One could follow upstream commits, but I found it easier to simply go
through the manual pages after each new (major) revision, adding new
options and removing old ones.


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

* Re: [PATCH] Updates to git completion
  2009-01-29 15:18       ` Nikolai Weibull
@ 2009-02-02 14:48         ` Allan Caffee
  0 siblings, 0 replies; 16+ messages in thread
From: Allan Caffee @ 2009-02-02 14:48 UTC (permalink / raw)
  To: Zsh Workers
  Cc: Richard Hartmann, Mikael Magnusson, Ingmar Vanhassel, Nikolai Weibull

On Thu, Jan 29, 2009 at 10:18 AM, Nikolai Weibull <now@bitwi.se> wrote:
> Yeah, that's way to complicated and adds even more complexity to an
> already complex code-base (I should know, I wrote the initial commit).
>  One could follow upstream commits, but I found it easier to simply go
> through the manual pages after each new (major) revision, adding new
> options and removing old ones.

This raises the question of why zsh is maintaining the completion for
git at all.  It would be simpler to match behavior with git's current
version if they were tracked together.  And git already tracks the
bash completion.  Thoughts?

-Allan


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

* Re: [PATCH] Updates to git completion
  2009-01-29 14:40   ` Mikael Magnusson
  2009-01-29 15:07     ` Richard Hartmann
@ 2009-02-03 10:44     ` Doug Kearns
  1 sibling, 0 replies; 16+ messages in thread
From: Doug Kearns @ 2009-02-03 10:44 UTC (permalink / raw)
  To: Zsh Hackers' List

On 1/30/09, Mikael Magnusson <mikachu@gmail.com> wrote:
> 2009/1/29 Richard Hartmann <richih.mailinglist@gmail.com>:

<snip>

>  > If you are adding/changing things which are not valid for older versions
>  > of git, you might want to check the git version and act depending on
>  > that.
>  > From looking over the patches (_not_ trying them!), they seem to
>  > make sense (provided that git has those options ;)
>
>
> I think trying to complete options for the right versions for ~130
>  commands could make the
>  code just a bit convoluted and hard to follow. Not even git itself
>  documents when options
>  were introduced.

Right.  In general only the latest version is supported.  This is
documented in Etc/completion-style-guide.

Regards,
Doug


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

end of thread, other threads:[~2009-02-03 10:44 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-01-29 12:21 [PATCH] Updates to git completion Ingmar Vanhassel
2009-01-29 12:21 ` [PATCH] Add "git remote rename" completion Ingmar Vanhassel
2009-01-29 12:21   ` [PATCH] Add "git describe --tags" completion. Fix typos Ingmar Vanhassel
2009-01-29 12:21     ` [PATCH] Complete "git add --intent-to-add" Ingmar Vanhassel
2009-01-29 12:21       ` [PATCH] "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached Ingmar Vanhassel
2009-01-29 12:21         ` [PATCH] Complete "git clone --verbose" Ingmar Vanhassel
2009-01-29 12:21           ` [PATCH] Complete "git commit --cleanup=" and "git commit --allow-empty" Ingmar Vanhassel
2009-01-29 12:21             ` [PATCH] Update "git rebase" completions Ingmar Vanhassel
2009-01-29 12:21               ` [PATCH] Update "git svn" completion Ingmar Vanhassel
2009-01-29 14:33         ` [PATCH] "git stage" is now a synonym for "git add". git diff: --staged is a synonym for --cached Richard Hartmann
2009-01-29 14:36 ` [PATCH] Updates to git completion Richard Hartmann
2009-01-29 14:40   ` Mikael Magnusson
2009-01-29 15:07     ` Richard Hartmann
2009-01-29 15:18       ` Nikolai Weibull
2009-02-02 14:48         ` Allan Caffee
2009-02-03 10:44     ` Doug Kearns

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).