Subject: [PATCH 00/25] completion: add missing diff options

From: "Philippe Blain via GitGitGadget" <[email-masked]>
Date: Sat, 10 Jun 2023 20:20:59 +0000

This series adds missing diff options to the Bash completion script.
Completion often serves as a discovery mechanism for options, so it is
beneficial to users if all options are offered by the completion script.

The list of missing options was generated by:

 1. Extracting all diff options from the documentation:
    
    git grep -h --no-column --only-match -e ^--[a-z][a-z-]*
    Documentation/diff-options.txt
    | sort -u > diff-options.txt

 2. Searching for each option in the completion script and visually checking
    which one was missing:
    
    while read p; do echo --- $p ---; echo; git grep --color -p -e $p
    upstream/master contrib/completion/git-completion.bash done <
    diff-options.txt

The only options I left out are --skip-to and --rotate-to, since I agree
with their documentation: they are probably not very useful outside of their
use in 'git difftool'.

Cheers,

Philippe.

Philippe Blain (25):
  completion: add comments describing __git_diff_* globals
  completion: complete --break-rewrites
  completion: complete --cc
  completion: complete --combined-all-paths
  completion: complete --compact-summary
  completion: complete --default-prefix
  completion: complete --find-copies
  completion: complete --find-object
  completion: complete --find-renames
  completion: complete --function-context
  completion: complete --ignore-matching-lines
  completion: complete --irreversible-delete
  completion: complete --ita-invisible-in-index and
    --ita-visible-in-index
  completion: complete --line-prefix
  completion: complete --no-relative
  completion: complete --no-stat
  completion: complete --output
  completion: complete --output-indicator-{context,new,old}
  completion: complete --patch-with-raw
  completion: complete --unified
  completion: complete --ws-error-highlight
  completion: move --pickaxe-{all,regex} to __git_diff_common_options
  completion: complete --diff-merges, its options and --no-diff-merges
  completion: complete --remerge-diff
  diff.c: mention completion above add_diff_options

 contrib/completion/git-completion.bash | 57 ++++++++++++++++++++++----
 diff.c                                 |  3 ++
 2 files changed, 51 insertions(+), 9 deletions(-)

base-commit: fe86abd7511a9a6862d5706c6fa1d9b57a63ba09
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1543%2Fphil-blain%2Fcompletion-common-diff-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1543/phil-blain/completion-common-diff-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/1543
-- 
gitgitgadget