* [PATCH 0/6] Completion updates for Git 1.8.4.1
@ 2013-10-20 17:43 Øystein Walle
2013-10-20 17:43 ` [PATCH 1/6] _git: Add git-clean -i/--interactive support Øystein Walle
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: Øystein Walle @ 2013-10-20 17:43 UTC (permalink / raw)
To: zsh-workers; +Cc: Øystein Walle
These patches bring the Git completion functions up to date with respect to
version 1.8.4.1 of Git. I've tried to make each commit a reasonable set of
changes but feel free to squash if you so desire.
Regards,
Øsse
Øystein Walle (6):
_git: Add git-clean -i/--interactive support
_git: Add new arguments introduced in Git v1.8.4
_git: Add status.short and status.branch
_git: Reword --heads to match new meaning
_git: Add two sub-comamnds introduced in v1.8.4
_git: Make --batch(-check) accept an argument
Completion/Unix/Command/_git | 42 ++++++++++++++++++++++++++++++++++++------
1 file changed, 36 insertions(+), 6 deletions(-)
--
1.8.4.1.516.g1d25dd4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 1/6] _git: Add git-clean -i/--interactive support
2013-10-20 17:43 [PATCH 0/6] Completion updates for Git 1.8.4.1 Øystein Walle
@ 2013-10-20 17:43 ` Øystein Walle
2013-10-20 17:43 ` [PATCH 2/6] _git: Add new arguments introduced in Git v1.8.4 Øystein Walle
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Øystein Walle @ 2013-10-20 17:43 UTC (permalink / raw)
To: zsh-workers; +Cc: Øystein Walle
- Add -i and --interactive to _git-clean()
- Add column.clean configuration variable
---
Completion/Unix/Command/_git | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index db1ff2f..25f925f 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -508,6 +508,7 @@ _git-clean () {
_arguments -w -C -S -s \
'-d[also remove untracked directories]' \
'(-f --force)'{-f,--force}'[required when clean.requireForce is true (default)]' \
+ '(-i --interactive)'{-i,--interactive}'[show what would be done and clean files interactively]' \
'(-n --dry-run)'{-n,--dry-run}'[only show what would and what would not be removed]' \
'(-q --quiet)'{-q,--quiet}'[only report errors]' \
'*'{-e,--exclude=}'[skip files matching specified pattern]:pattern' \
@@ -1803,6 +1804,7 @@ _git-config () {
cvsexportcommit.cvsdir:'the default location of the CVS checkout to use for the export:cvs export dir:_directories'
column.ui:'specify whether supported commands should output in columns.::->column:never'
column.branch:'specify whether to output branch listing in git branch in columns::->column:never'
+ column.clean:'specify the layout when listing items in git clean -i::->column:never'
column.status:'specify whether to output untracked files in git status in columns::->column:never'
column.tag:'specify whether to output tag listing in git tag in columns::->column:never'
core.fileMode:'track changes to the executable bit of files::->bool:true'
--
1.8.4.1.516.g1d25dd4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/6] _git: Add new arguments introduced in Git v1.8.4
2013-10-20 17:43 [PATCH 0/6] Completion updates for Git 1.8.4.1 Øystein Walle
2013-10-20 17:43 ` [PATCH 1/6] _git: Add git-clean -i/--interactive support Øystein Walle
@ 2013-10-20 17:43 ` Øystein Walle
2013-10-20 17:43 ` [PATCH 3/6] _git: Add status.short and status.branch Øystein Walle
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Øystein Walle @ 2013-10-20 17:43 UTC (permalink / raw)
To: zsh-workers; +Cc: Øystein Walle
---
Completion/Unix/Command/_git | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 25f925f..5b1e710 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -684,6 +684,7 @@ _git-describe () {
'(--abbrev)--long[always show full format, even for exact matches]' \
'--match=[only consider tags matching glob pattern]:pattern' \
'--always[show uniquely abbreviated commit object as fallback]' \
+ '--first-parent[follow only the first parent of merge commits]' \
'*: :__git_committishs'
}
@@ -835,6 +836,7 @@ _git-format-patch () {
'(-k --keep-subject)--subject-prefix=[use the given prefix instead of \[PATCH\]]:prefix' \
'*--to=[add To: header to email headers]: :_email_addresses' \
'*--cc=[add Cc: header to email headers]: :_email_addresses' \
+ '--from=[add From: header to email headers]: :_email_addresses' \
'*--add-header=[add an arbitrary header to email headers]:header' \
'--cover-letter[generate a cover letter template]' \
'--notes=[append notes for the commit after the three-dash line]:: :__git_notes_refs' \
@@ -1050,6 +1052,7 @@ _git-log () {
$log_options \
$revision_options \
$diff_options \
+ '-L+[trace the evolution of a line range or regex within a file]:range' \
'(-)--[start file arguments]' \
'*:: :->commit-range-or-file' && ret=0
@@ -1241,6 +1244,7 @@ _git-push () {
'(-q --quiet -v --verbose --progress)'{-q,--quiet}'[suppress all output]' \
'(-q --quiet -v --verbose)'{-v,--verbose}'[output additional information]' \
'(-q --quiet)--progress[output progress information]' \
+ '(--verify)--no-verify[bybass the pre-push hook]' \
'--recurse-submodules=[submodule handling]:submodule handling:((check\:"refuse pushing of supermodule if submodule commit cannot be found on the remote"
on-demand\:"push all changed submodules"))' \
':: :__git_any_repositories' \
@@ -5884,13 +5888,14 @@ __git_setup_log_options () {
(( $+functions[__git_setup_diff_options] )) ||
__git_setup_diff_options () {
- local diff_types='(-p -u --patch -U --unified --raw --patch-with-raw --stat --numstat --shortstat --dirstat --dirstat-by-file --summary --patch-with-stat --name-only --name-status --cumulative)'
+ local diff_types='(-p -u --patch -U --unified --raw --patch-with-raw --stat --numstat --shortstat --dirstat --dirstat-by-file --summary --patch-with-stat --name-only --name-status --cumulative -s --no-patch)'
diff_options=(
$diff_types{-p,-u,--patch}'[generate diff in patch format]'
$diff_types{-U,--unified=}'[generate diff with given lines of context]: :__git_guard_number lines'
$diff_types'--raw[generate default raw diff output]'
$diff_types'--patch-with-raw[generate patch but also keep the default raw diff output]'
+ $diff_types{-s,--no-patch}'[suppress diff output]'
'(--minimal --patience --histogram --diff-algorithm)--minimal[spend extra time to make sure the smallest possible diff is producedm]'
'(--minimal --patience --histogram --diff-algorithm)--patience[generate diffs with patience algorithm]'
'(--minimal --patience --histogram --diff-algorithm)--histogram[generate diffs with histogram algorithm]'
@@ -5942,6 +5947,7 @@ __git_setup_diff_options () {
'--ignore-space-at-eol[ignore changes in whitespace at end of line]'
'(-b --ignore-space-change -w --ignore-all-space)'{-b,--ignore-space-change}'[ignore changes in amount of white space]'
'(-b --ignore-space-change -w --ignore-all-space)'{-w,--ignore-all-space}'[ignore white space when comparing lines]'
+ '--ignore-blank-lines[do not show hunks that add or remove blank lines]'
'--inter-hunk-context=[combine hunks closer than n lines]:n'
'--exit-code[report exit code 1 if differences, 0 otherwise]'
'(--exit-code)--quiet[disable all output]'
@@ -6035,8 +6041,9 @@ __git_setup_revision_options () {
'(--full-history --dense --simplify-merges --ancestry-path)--sparse[when paths are given, display only commits that changes any of them]'
'(--full-history --dense --sparse --ancestry-path)--simplify-merges[milder version of --full-history]'
'(--full-history --dense --sparse --simplify-merges )--ancestry-path[only display commits that exists directly on ancestry chains]'
- '( --date-order)--topo-order[display commits in topological order]'
- '(--topo-order )--date-order[display commits in date order]'
+ '( --date-order --author-date-order)--topo-order[display commits in topological order]'
+ '(--topo-order --author-date-order)--date-order[display commits in date order]'
+ '(--topo-order --date-order )--author-date-order[display commits in auhor date order]'
'(-g --walk-reflogs)--reverse[display commits in reverse order]'
'( --objects-edge)--objects[display object ids of objects referenced by listed commits]'
'(--objects )--objects-edge[display object ids of objects referenced by listed and excluded commits]'
--
1.8.4.1.516.g1d25dd4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 3/6] _git: Add status.short and status.branch
2013-10-20 17:43 [PATCH 0/6] Completion updates for Git 1.8.4.1 Øystein Walle
2013-10-20 17:43 ` [PATCH 1/6] _git: Add git-clean -i/--interactive support Øystein Walle
2013-10-20 17:43 ` [PATCH 2/6] _git: Add new arguments introduced in Git v1.8.4 Øystein Walle
@ 2013-10-20 17:43 ` Øystein Walle
2013-10-20 17:43 ` [PATCH 4/6] _git: Reword --heads to match new meaning Øystein Walle
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Øystein Walle @ 2013-10-20 17:43 UTC (permalink / raw)
To: zsh-workers; +Cc: Øystein Walle
---
Completion/Unix/Command/_git | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 5b1e710..eb2da11 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -2199,6 +2199,8 @@ _git-config () {
status.relativePaths:'show paths relative to current directory::->bool:false'
status.showUntrackedFiles:'show untracked files::->status.showUntrackedFiles:normal'
status.submodulesummary:'include submodule summary::->bool:false'
+ status.branch:'show branch and tracking info in short format::->bool:false'
+ status.short:'use short format by default::->bool:false'
'submodule.*.branch:remote branch name for a submodule:branch name:->string'
'submodule.*.fetchRecurseSubmodules:fetch commits of submodules::->bool'
'submodule.*.path:path within project:submodule directory:_directories -qS \:'
--
1.8.4.1.516.g1d25dd4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 4/6] _git: Reword --heads to match new meaning
2013-10-20 17:43 [PATCH 0/6] Completion updates for Git 1.8.4.1 Øystein Walle
` (2 preceding siblings ...)
2013-10-20 17:43 ` [PATCH 3/6] _git: Add status.short and status.branch Øystein Walle
@ 2013-10-20 17:43 ` Øystein Walle
2013-10-20 17:43 ` [PATCH 5/6] _git: Add two sub-comamnds introduced in v1.8.4 Øystein Walle
2013-10-20 17:43 ` [PATCH 6/6] _git: Make --batch(-check) accept an argument Øystein Walle
5 siblings, 0 replies; 7+ messages in thread
From: Øystein Walle @ 2013-10-20 17:43 UTC (permalink / raw)
To: zsh-workers; +Cc: Øystein Walle
---
Completion/Unix/Command/_git | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index eb2da11..36e9707 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4429,7 +4429,7 @@ _git-show-ref () {
- list \
'(-h --head)'{-h,--head}'[show HEAD reference]' \
'--tags[show only refs/tags]' \
- '--heads[show only refs/heads]' \
+ '--heads[show only HEAD and refs under refs/heads]' \
'(-d --dereference)'{-d,--dereference}'[dereference tags into object IDs as well]' \
'(-s --hash)'{-s+,--hash=-}'[only show the SHA-1 hash, not the reference name]:: :__git_guard_number length' \
'--verify[enable stricter reference checking]' \
--
1.8.4.1.516.g1d25dd4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 5/6] _git: Add two sub-comamnds introduced in v1.8.4
2013-10-20 17:43 [PATCH 0/6] Completion updates for Git 1.8.4.1 Øystein Walle
` (3 preceding siblings ...)
2013-10-20 17:43 ` [PATCH 4/6] _git: Reword --heads to match new meaning Øystein Walle
@ 2013-10-20 17:43 ` Øystein Walle
2013-10-20 17:43 ` [PATCH 6/6] _git: Make --batch(-check) accept an argument Øystein Walle
5 siblings, 0 replies; 7+ messages in thread
From: Øystein Walle @ 2013-10-20 17:43 UTC (permalink / raw)
To: zsh-workers; +Cc: Øystein Walle
Add _git-check-ignore() and _git-check-mailmap()
---
Completion/Unix/Command/_git | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 36e9707..0f41acb 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -399,6 +399,23 @@ _git-bundle () {
return ret
}
+(( $+functions[_git-check-ignore] )) ||
+_git-check-ignore () {
+ _arguments \
+ '(-q --quiet)'{-q,--quiet}'[do not output anything, just set exit status]' \
+ '(-v --verbose)'{-v,--verbose}'[output details about the matching pattern (if any) for each pathname]' \
+ '--stdin[read file names from stdin instead of from the command-line]' \
+ '-z[make output format machine-parseable]' \
+ '(-n --non-matching)'{-n,--non-matching}'[show given paths which do not match any pattern]' \
+ '*:: :->file' && ret=0
+}
+
+(( $+functions[_git-check-mailmap] )) ||
+_git-check-mailmap () {
+ _arguments \
+ '--stdin[read contacts from stdin after those given on the command line]'
+}
+
(( $+functions[_git-checkout] )) ||
_git-checkout () {
# TODO: __git_tree_ishs is just stupid. It should be giving us a list of tags
@@ -5008,6 +5025,8 @@ _git_commands () {
local -a plumbing_internal_helper_commands
plumbing_internal_helper_commands=(
check-attr:'display gitattributes information'
+ check-ignore:'debug gitignore/exclude files'
+ check-mailmap:'show canonical names and email addresses of contacts'
check-ref-format:'ensure that a reference name is well formed'
fmt-merge-msg:'produce merge commit message'
mailinfo:'extract patch and authorship from a single email message'
--
1.8.4.1.516.g1d25dd4
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 6/6] _git: Make --batch(-check) accept an argument
2013-10-20 17:43 [PATCH 0/6] Completion updates for Git 1.8.4.1 Øystein Walle
` (4 preceding siblings ...)
2013-10-20 17:43 ` [PATCH 5/6] _git: Add two sub-comamnds introduced in v1.8.4 Øystein Walle
@ 2013-10-20 17:43 ` Øystein Walle
5 siblings, 0 replies; 7+ messages in thread
From: Øystein Walle @ 2013-10-20 17:43 UTC (permalink / raw)
To: zsh-workers; +Cc: Øystein Walle
Also reword the explanation slightly to make it more compact since more
explanation is needed.
---
Completion/Unix/Command/_git | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
index 0f41acb..119a705 100644
--- a/Completion/Unix/Command/_git
+++ b/Completion/Unix/Command/_git
@@ -4192,8 +4192,8 @@ _git-cat-file () {
'(- 1)-e[exit with zero status if object exists]' \
'(- 1)-p[pretty-print given object]' \
'(- 1)--textconv[show content as transformed by a textconv filter]' \
- '(- :)--batch[print SHA1, type, size, and contents of each object provided on stdin]' \
- '(- :)--batch-check[print SHA1, type, and size of each object provided on stdin]' \
+ '(- :)--batch=-[print SHA1, type, size and contents (or in <format>) of objects given on stdin]:format' \
+ '(- :)--batch-check=-[print SHA1, type and size (or in <format>) of objects given on stdin]:format' \
'(-):object type:(blob commit tag tree)' \
': :__git_objects'
}
--
1.8.4.1.516.g1d25dd4
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2013-10-20 17:48 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-10-20 17:43 [PATCH 0/6] Completion updates for Git 1.8.4.1 Øystein Walle
2013-10-20 17:43 ` [PATCH 1/6] _git: Add git-clean -i/--interactive support Øystein Walle
2013-10-20 17:43 ` [PATCH 2/6] _git: Add new arguments introduced in Git v1.8.4 Øystein Walle
2013-10-20 17:43 ` [PATCH 3/6] _git: Add status.short and status.branch Øystein Walle
2013-10-20 17:43 ` [PATCH 4/6] _git: Reword --heads to match new meaning Øystein Walle
2013-10-20 17:43 ` [PATCH 5/6] _git: Add two sub-comamnds introduced in v1.8.4 Øystein Walle
2013-10-20 17:43 ` [PATCH 6/6] _git: Make --batch(-check) accept an argument Øystein Walle
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).