Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 12/16] _git: correct some "undocumented" options



From: m0viefreak <m0viefreak.cm@xxxxxxxxxxxxxx>

diff options:
  --cumulative is deprecated --> remove
  --follow was already in there --> remove duplicate
  -G / -S: reword -S to emphase the difference to -G

revision options:
  --abbrev: reword, to emphase the --abbrev-commit requirement
---
 Completion/Unix/Command/_git | 33 +++++++++++----------------------
 1 file changed, 11 insertions(+), 22 deletions(-)

diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 916fbaf..b30d088 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2965,10 +2965,9 @@ _git-reflog () {
 
 (( $+functions[_git-relink] )) ||
 _git-relink () {
-  # TODO: --help is undocumented.
   _arguments \
     '--safe[stop if two objects with the same hash exist but have different sizes]' \
-    '--help[display help]' \
+    '(-)'{-h,--help}'[display usage information]' \
     ': :_directories' \
     ': :_directories' \
     '*: :_directories'
@@ -3928,7 +3927,6 @@ _git-merge-file () {
   fi
 
   # TODO: --marker-size in undocumented.
-  # TODO: --diff3 is undocumented.
   _arguments \
     $label_opt \
     '(-p --stdout)'{-p,--stdout}'[send merged file to standard output instead of overwriting first file]' \
@@ -3937,7 +3935,7 @@ _git-merge-file () {
     '(--ours          --union)--theirs[resolve conflicts favoring their side of the lines]' \
     '(--ours --theirs        )--union[resolve conflicts favoring both sides of the lines]' \
     '--marker-size[specify length of conflict markers]: :__git_guard_number "marker length"' \
-    '--diff3[undocumented]' \
+    '--diff3[use a diff3 based merge]' \
     ':current file:_files' \
     ':base file:_files' \
     ':other file:_files'
@@ -4010,8 +4008,8 @@ _git-pack-objects () {
     '--delta-base-offset[use delta-base-offset packing]' \
     '--threads=-[specify number of threads for searching for best delta matches]: :__git_guard_number "number of threads"' \
     '--keep-true-parents[pack parents hidden by grafts]' \
-    '(                   --unpack-unreachable)--keep-unreachable[undocumented]' \
-    '(--keep-unreachable                     )--unpack-unreachable[undocumented]' \
+    '(                   --unpack-unreachable)--keep-unreachable[keep unreachable objects]' \
+    '(--keep-unreachable                     )--unpack-unreachable=[unpack unreachable objects newer than <time>]:time' \
     ':base-name:_files'
 }
 
@@ -4502,7 +4500,6 @@ _git-http-backend () {
 
 (( $+functions[_git-send-pack] )) ||
 _git-send-pack () {
-  # TODO: --mirror is undocumented.
   # TODO: --stateless-rpc is undocumented.
   # TODO: --helper-status is undocumented.
   _arguments -A '-*' \
@@ -4512,7 +4509,7 @@ _git-send-pack () {
     '--force[update remote orphaned refs]' \
     '-v[produce verbose output]' \
     '--thin[send a thin pack]' \
-    '--mirror[undocumented]' \
+    '--mirror[mirror all refs]' \
     '--stateless-rpc[undocumented]' \
     '--helper-status[undocumented]' \
     ': :__git_any_repositories' \
@@ -5911,7 +5908,8 @@ __git_setup_diff_options () {
     '(-D --irreversible-delete)'{-D,--irreversible-delete}'[omit the preimage for deletes]'
     '-l-[limit number of rename/copy targets to run]: :__git_guard_number'
     '--diff-filter=-[select certain kinds of files for diff]: :_guard "[ACDMRTUXB*]#" kinds'
-    '-S-[look for differences that contain the given string]:string'
+    '-S-[look for differences that add or remove the given string]:string'
+    '-G-[look for differences whose added or removed line matches the given regex]:pattern'
     '--pickaxe-all[when -S finds a change, show all changes in that changeset]'
     '--pickaxe-regex[treat argument of -S as regular expression]'
     '-O-[output patch in the order of glob-pattern lines in given file]: :_files'
@@ -5926,6 +5924,8 @@ __git_setup_diff_options () {
     '(--exit-code)--quiet[disable all output]'
     '(           --no-ext-diff)--ext-diff[allow external diff helper to be executed]'
     '(--ext-diff              )--no-ext-diff[disallow external diff helper to be executed]'
+    '(--textconv --no-textconv)--textconv[allow external text conversion filters to be run when comparing binary files]'
+    '(--textconv --no-textconv)--no-textconv[do not allow external text conversion filters to be run when comparing binary files]'
     '(          --no-follow)--follow[follow renames]'
     '(--follow             )--no-follow[do not follow renames]'
     '--ignore-submodules[ignore changes to submodules]:: :__git_ignore_submodules_whens'
@@ -5940,16 +5940,6 @@ __git_setup_diff_options () {
     '(-0 -1 -2 -3 --base --ours --theirs -c --cc --no-index)'{-c,--cc}'[compare "our branch", "their branch" and working tree files]'
     '-q[remain silent even on nonexisting files]'
 
-    # TODO: --cumulative is undocumented.
-    '--cumulative[undocumented]'
-    # TODO: --follow is undocumented.
-    '--follow[undocumented]'
-    # TODO: --textconv is undocumented.
-    '--textconv[undocumented]'
-    # TODO: --no-textconv is undocumented.
-    '--no-textconv[undocumented]'
-    # TODO: -G is undocumented.
-    '-G[undocumented]'
     # TODO: --output is undocumented.
     '--output[undocumented]:undocumented')
 }
@@ -5973,6 +5963,8 @@ __git_setup_revision_options () {
                                                                                     format\:"specify own format"))'
     '(--abbrev-commit --no-abbrev-commit)--abbrev-commit[show only partial prefixes of commit object names]'
     '(--abbrev-commit --no-abbrev-commit)--no-abbrev-commit[show the full 40-byte hexadecimal commit object name]'
+    '(--abbrev --no-abbrev)--abbrev=[set minimum SHA1 display-length (for use with --abbrev-commit)]: :__git_guard_number length'
+    '(--abbrev --no-abbrev)--no-abbrev[show the full 40-byte hexadecimal commit object name]'
     '--oneline[shorthand for --pretty=oneline --abbrev-commit]'
     '--encoding=-[output log messages in given encoding]:: :__git_encodings'
     '(--no-notes --notes)--no-notes[do not show notes that annotate commit]'
@@ -6041,9 +6033,6 @@ __git_setup_revision_options () {
 
     '--reflog[show all commits from reflogs]'
     '--default[use argument as default revision]:default revision:__git_revisions'
-    '--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length'
-    # TODO: --no-abbrev is undocumented.
-    '--no-abbrev[undocumented]'
     # TODO: --early-output is undocumented.
     '--early-output=-[undocumented]::undocumented'
     )
-- 
1.8.2.2



Messages sorted by: Reverse Date, Date, Thread, Author