Thread (1 message) 1 message, 1 author, 2019-09-13

Re: [PATCH] completion: add missing completions for log, diff, show

From: Johannes Schindelin <hidden>
Date: 2019-09-13 21:04:01

Hi Max,

[your reply did not make it to the Git mailing list because it drops
anything with an HTML part]

On Thu, 12 Sep 2019, Max Rothman wrote:
Great! What’s the path for getting this merged?
Usually it will be picked up into the `pu` branch first, then advance to
`next`, and then to `master`. Once it is in `master`, it will be part of
the then-next official version ending in `.0`.

You can also read about the state of your patch (once it has been picked
up) in the bi-weekly "What's cooking" mails. If you're not subscribed,
you can look at the current version on the web:
https://github.com/git/git/blob/todo/whats-cooking.txt

Ciao,
Johannes
On Thu, Sep 12, 2019 at 4:54 AM Johannes Schindelin <
Johannes.Schindelin@gmx.de> wrote:
quoted
Hi Max,

The patch looks good to me!

Thanks,
Johannes

On Wed, 11 Sep 2019, Max Rothman wrote:
quoted
On Thu, Aug 1, 2019 at 8:54 PM Max Rothman [off-list ref]
wrote:
quoted
quoted
On Thu, Aug 1, 2019 at 8:50 PM Max Rothman [off-list ref]
wrote:
quoted
quoted
quoted
The bash completion script knows some options to "git log" and
"git show" only in the positive form, (e.g. "--abbrev-commit"), but
not
quoted
quoted
quoted
in their negative form (e.g. "--no-abbrev-commit"). Add them.

Also, the bash completion script is missing some other options to
"git diff", and "git show" (and thus, all other commands that take
"git diff"'s options). Add them. Of note, since "--indent-heuristic"
is
quoted
quoted
quoted
no longer experimental, add that too.

Signed-off-by: Max Rothman <redacted>
---
 contrib/completion/git-completion.bash | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
quoted
quoted
quoted
index 9f71bcde967bc..b6d18710135ec 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1474,6 +1474,8 @@ __git_diff_common_options="--stat --numstat
--shortstat --summary
quoted
quoted
quoted
                        --dirstat-by-file= --cumulative
                        --diff-algorithm=
                        --submodule --submodule= --ignore-submodules
+                       --indent-heuristic --no-indent-heuristic
+                       --textconv --no-textconv
 "

 _git_diff ()
@@ -1782,6 +1784,10 @@ _git_log ()
                __gitcomp "$__git_diff_submodule_formats" ""
"${cur##--submodule=}"
quoted
quoted
quoted
                return
                ;;
+       --no-walk=*)
+               __gitcomp "sorted unsorted" "" "${cur##--no-walk=}"
+               return
+               ;;
        --*)
                __gitcomp "
                        $__git_log_common_options
@@ -1789,16 +1795,19 @@ _git_log ()
                        $__git_log_gitk_options
                        --root --topo-order --date-order --reverse
                        --follow --full-diff
-                       --abbrev-commit --abbrev=
+                       --abbrev-commit --no-abbrev-commit --abbrev=
                        --relative-date --date=
                        --pretty= --format= --oneline
                        --show-signature
                        --cherry-mark
                        --cherry-pick
                        --graph
-                       --decorate --decorate=
+                       --decorate --decorate= --no-decorate
                        --walk-reflogs
+                       --no-walk --no-walk= --do-walk
                        --parents --children
+                       --expand-tabs --expand-tabs= --no-expand-tabs
+                       --patch
                        $merge
                        $__git_diff_common_options
                        --pickaxe-all --pickaxe-regex
@@ -2525,8 +2534,9 @@ _git_show ()
                return
                ;;
        --*)
-               __gitcomp "--pretty= --format= --abbrev-commit
--oneline
quoted
quoted
quoted
-                       --show-signature
+               __gitcomp "--pretty= --format= --abbrev-commit
--no-abbrev-commit
quoted
quoted
quoted
+                       --oneline --show-signature --patch
+                       --expand-tabs --expand-tabs= --no-expand-tabs
                        $__git_diff_common_options
                        "
                return

--
https://github.com/git/git/pull/426
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help