completion: complete --diff-merges, its options and --no-diff-merges
The flags --[no-]diff-merges only make sense for 'git log' and 'git show', so add a new variable __git_log_show_options for options only relevant to these two commands, and add them there. Also add __git_diff_merges_opts and list the accepted values for --diff-merges, and use it in _git_log and _git_show. Signed-off-by: Philippe Blain <levraiphilippeblain@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
d520d98382
commit
98aaeb2f77
|
@ -2040,6 +2040,12 @@ __git_log_shortlog_options="
|
||||||
--author= --committer= --grep=
|
--author= --committer= --grep=
|
||||||
--all-match --invert-grep
|
--all-match --invert-grep
|
||||||
"
|
"
|
||||||
|
# Options accepted by log and show
|
||||||
|
__git_log_show_options="
|
||||||
|
--diff-merges --diff-merges= --no-diff-merges
|
||||||
|
"
|
||||||
|
|
||||||
|
__git_diff_merges_opts="off none on first-parent 1 separate m combined c dense-combined cc remerge r"
|
||||||
|
|
||||||
__git_log_pretty_formats="oneline short medium full fuller reference email raw format: tformat: mboxrd"
|
__git_log_pretty_formats="oneline short medium full fuller reference email raw format: tformat: mboxrd"
|
||||||
__git_log_date_formats="relative iso8601 iso8601-strict rfc2822 short local default human raw unix auto: format:"
|
__git_log_date_formats="relative iso8601 iso8601-strict rfc2822 short local default human raw unix auto: format:"
|
||||||
|
@ -2096,11 +2102,16 @@ _git_log ()
|
||||||
__gitcomp "sorted unsorted" "" "${cur##--no-walk=}"
|
__gitcomp "sorted unsorted" "" "${cur##--no-walk=}"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
--diff-merges=*)
|
||||||
|
__gitcomp "$__git_diff_merges_opts" "" "${cur##--diff-merges=}"
|
||||||
|
return
|
||||||
|
;;
|
||||||
--*)
|
--*)
|
||||||
__gitcomp "
|
__gitcomp "
|
||||||
$__git_log_common_options
|
$__git_log_common_options
|
||||||
$__git_log_shortlog_options
|
$__git_log_shortlog_options
|
||||||
$__git_log_gitk_options
|
$__git_log_gitk_options
|
||||||
|
$__git_log_show_options
|
||||||
--root --topo-order --date-order --reverse
|
--root --topo-order --date-order --reverse
|
||||||
--follow --full-diff
|
--follow --full-diff
|
||||||
--abbrev-commit --no-abbrev-commit --abbrev=
|
--abbrev-commit --no-abbrev-commit --abbrev=
|
||||||
|
@ -3015,10 +3026,15 @@ _git_show ()
|
||||||
__gitcomp "$__git_ws_error_highlight_opts" "" "${cur##--ws-error-highlight=}"
|
__gitcomp "$__git_ws_error_highlight_opts" "" "${cur##--ws-error-highlight=}"
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
--diff-merges=*)
|
||||||
|
__gitcomp "$__git_diff_merges_opts" "" "${cur##--diff-merges=}"
|
||||||
|
return
|
||||||
|
;;
|
||||||
--*)
|
--*)
|
||||||
__gitcomp "--pretty= --format= --abbrev-commit --no-abbrev-commit
|
__gitcomp "--pretty= --format= --abbrev-commit --no-abbrev-commit
|
||||||
--oneline --show-signature
|
--oneline --show-signature
|
||||||
--expand-tabs --expand-tabs= --no-expand-tabs
|
--expand-tabs --expand-tabs= --no-expand-tabs
|
||||||
|
$__git_log_show_options
|
||||||
$__git_diff_common_options
|
$__git_diff_common_options
|
||||||
"
|
"
|
||||||
return
|
return
|
||||||
|
|
Loading…
Reference in New Issue