]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'bk/complete-bisect'
authorJunio C Hamano <gitster@pobox.com>
Mon, 12 Feb 2024 21:16:10 +0000 (13:16 -0800)
committerJunio C Hamano <gitster@pobox.com>
Mon, 12 Feb 2024 21:16:10 +0000 (13:16 -0800)
Command line completion support (in contrib/) has been
updated for "git bisect".

* bk/complete-bisect:
  completion: bisect: recognize but do not complete view subcommand
  completion: bisect: complete log opts for visualize subcommand
  completion: new function __git_complete_log_opts
  completion: bisect: complete missing --first-parent and - -no-checkout options
  completion: bisect: complete custom terms and related options
  completion: bisect: complete bad, new, old, and help subcommands
  completion: tests: always use 'master' for default initial branch name

1  2 
contrib/completion/git-completion.bash
t/t9902-completion.sh

index c3408d414370d32d7defa2d1e98a32ee6b4fddfc,0734debc11294a90572bb928c8cca2184518256d..1a7bc05a720706712bd7794565c38336a2c50950
@@@ -2105,13 -2100,15 +2144,15 @@@ __git_diff_merges_opts="off none on fir
  __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 ()
+ # Complete porcelain (i.e. not git-rev-list) options and at least some
+ # option arguments accepted by git-log.  Note that this same set of options
+ # are also accepted by some other git commands besides git-log.
+ __git_complete_log_opts ()
  {
-       __git_has_doubledash && return
-       __git_find_repo_path
+       COMPREPLY=()
  
        local merge=""
 -      if [ -f "$__git_repo_path/MERGE_HEAD" ]; then
 +      if __git_pseudoref_exists MERGE_HEAD; then
                merge="--merge"
        fi
        case "$prev,$cur" in
index 35eb534fdda2735786faf1fa62bb399ddcc52f27,70557eb6844259685d2f94cec00d55d4e81573da..d744883d5c9bb17857ad790c17cb3cf3770f7049
@@@ -5,12 -5,11 +5,17 @@@
  
  test_description='test bash completion'
  
 +# The Bash completion scripts must not print anything to either stdout or
 +# stderr, which we try to verify. When tracing is enabled without support for
 +# BASH_XTRACEFD this assertion will fail, so we have to mark the test as
 +# untraceable with such ancient Bash versions.
 +test_untraceable=UnfortunatelyYes
 +
+ # Override environment and always use master for the default initial branch
+ # name for these tests, so that rev completion candidates are as expected.
+ GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME=master
+ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME
  . ./lib-bash.sh
  
  complete ()