From: Junio C Hamano Date: Mon, 30 Sep 2019 04:19:30 +0000 (+0900) Subject: Merge branch 'dl/complete-cherry-pick-revert-skip' X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/21db12c9ea572a34bd9d4388135b1a9553c28133?hp=-c Merge branch 'dl/complete-cherry-pick-revert-skip' The command line completion support (in contrib/) learned about the "--skip" option of "git revert" and "git cherry-pick". * dl/complete-cherry-pick-revert-skip: status: mention --skip for revert and cherry-pick completion: add --skip for cherry-pick and revert completion: merge options for cherry-pick and revert --- 21db12c9ea572a34bd9d4388135b1a9553c28133 diff --combined contrib/completion/git-completion.bash index ce7ff0a96d,b4651411b2..6f7b4f9607 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@@ -340,7 -340,7 +340,7 @@@ __gitcomp ( c="$c${4-}" if [[ $c == "$cur_"* ]]; then case $c in - --*=*|*.) ;; + --*=|*.) ;; *) c="$c " ;; esac COMPREPLY[i++]="${2-}$c" @@@ -360,7 -360,7 +360,7 @@@ c="$c${4-}" if [[ $c == "$cur_"* ]]; then case $c in - --*=*|*.) ;; + *=|*.) ;; *) c="$c " ;; esac COMPREPLY[i++]="${2-}$c" @@@ -524,7 -524,7 +524,7 @@@ __git_index_files ( # Even when a directory name itself does not contain # any special characters, it will still be quoted if # any of its (stripped) trailing path components do. - # Because of this we may have seen the same direcory + # Because of this we may have seen the same directory # both quoted and unquoted. if (p in paths) # We have seen the same directory unquoted, @@@ -1361,7 -1361,9 +1361,9 @@@ _git_checkout ( esac } - __git_cherry_pick_inprogress_options="--continue --quit --abort" + __git_sequencer_inprogress_options="--continue --quit --abort --skip" + + __git_cherry_pick_inprogress_options=$__git_sequencer_inprogress_options _git_cherry_pick () { @@@ -1399,18 -1401,7 +1401,18 @@@ _git_clean ( _git_clone () { + case "$prev" in + -c|--config) + __git_complete_config_variable_name_and_value + return + ;; + esac case "$cur" in + --config=*) + __git_complete_config_variable_name_and_value \ + --cur="${cur##--config=}" + return + ;; --*) __gitcomp_builtin clone return @@@ -2236,282 -2227,181 +2238,282 @@@ __git_config_vars __git_compute_config_vars () { test -n "$__git_config_vars" || - __git_config_vars="$(git help --config-for-completion | sort | uniq)" + __git_config_vars="$(git help --config-for-completion | sort -u)" } -_git_config () +# Completes possible values of various configuration variables. +# +# Usage: __git_complete_config_variable_value [