completion: new function __git_complete_log_opts
commita9e5b7a76da5ceab772166c94830dd899cf55b88
authorBritton Leo Kerin <britton.kerin@gmail.com>
Tue, 6 Feb 2024 21:50:46 +0000 (6 12:50 -0900)
committerJunio C Hamano <gitster@pobox.com>
Tue, 6 Feb 2024 23:11:46 +0000 (6 15:11 -0800)
tree94d9b089f75cd7436a3aeececf8d9753dad16c36
parent41928aeb45e70d4361c780cc69d3975faee5eec4
completion: new function __git_complete_log_opts

The options accepted by git-log are also accepted by at least one other
command (git-bisect).  Factor the common option completion code into a
new function and use it from _git_log.  The new function leaves
COMPREPLY empty if no option candidates are found, so that callers can
safely check it to determine if completion for other arguments should be
attempted.

Signed-off-by: Britton Leo Kerin <britton.kerin@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash