Skip to content

completion: add missing diff options

Philippe Blain via GitGitGadget git 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest24 patches 0 repliesNew
  2. v225 patches 2 repliesSuperseded
  3. v125 patches 4 repliesSuperseded

Changes in v3 from the cover letter

* removed --patch-with-raw on Junio's suggestion, '-p --raw' does the exact same thing.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/24completion: add comments describing __git_diff_* globalscontrib/completion/git-completion.bash+2 -00 replies
2/24completion: complete --break-rewritescontrib/completion/git-completion.bash+1 -10 replies
3/24completion: complete --cccontrib/completion/git-completion.bash+1 -10 replies
4/24completion: complete --combined-all-pathscontrib/completion/git-completion.bash+1 -10 replies
5/24completion: complete --compact-summarycontrib/completion/git-completion.bash+1 -10 replies
6/24completion: complete --default-prefixcontrib/completion/git-completion.bash+1 -10 replies
7/24completion: complete --find-copiescontrib/completion/git-completion.bash+1 -00 replies
8/24completion: complete --find-objectcontrib/completion/git-completion.bash+1 -10 replies
9/24completion: complete --find-renamescontrib/completion/git-completion.bash+1 -10 replies
10/24completion: complete --function-contextcontrib/completion/git-completion.bash+1 -10 replies
11/24completion: complete --ignore-matching-linescontrib/completion/git-completion.bash+1 -10 replies
12/24completion: complete --irreversible-deletecontrib/completion/git-completion.bash+1 -00 replies
13/24completion: complete --ita-invisible-in-index and --ita-visible-in-indexcontrib/completion/git-completion.bash+1 -00 replies
14/24completion: complete --line-prefixcontrib/completion/git-completion.bash+1 -10 replies
15/24completion: complete --no-relativecontrib/completion/git-completion.bash+2 -10 replies
16/24completion: complete --no-statcontrib/completion/git-completion.bash+1 -10 replies
17/24completion: complete --outputcontrib/completion/git-completion.bash+1 -00 replies
18/24completion: complete --output-indicator-{context,new,old}contrib/completion/git-completion.bash+2 -10 replies
19/24completion: complete --unifiedcontrib/completion/git-completion.bash+1 -10 replies
20/24completion: complete --ws-error-highlightcontrib/completion/git-completion.bash+14 -00 replies
21/24completion: move --pickaxe-{all,regex} to __git_diff_common_optionscontrib/completion/git-completion.bash+3 -20 replies
22/24completion: complete --diff-merges, its options and --no-diff-mergescontrib/completion/git-completion.bash+16 -00 replies
23/24completion: complete --remerge-diffcontrib/completion/git-completion.bash+1 -10 replies
24/24diff.c: mention completion above add_diff_optionsdiff.c+4 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 00/24] completion: add missing diff options

Changes since v2:

* removed --patch-with-raw on Junio's suggestion, '-p --raw' does the exact same thing.

Changes since v1:

* correted authorship in 21/25
* fixed typos pointed out by Eric

v1: 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 (24):
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 --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                                 |  4 ++
 2 files changed, 52 insertions(+), 9 deletions(-)

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

Range-diff vs v2:

  1:  4edabc7f15c =  1:  4edabc7f15c completion: add comments describing __git_diff_* globals
  2:  1f3c9e8d417 =  2:  1f3c9e8d417 completion: complete --break-rewrites
  3:  d38823dd116 =  3:  d38823dd116 completion: complete --cc
  4:  51024ee2f2c =  4:  51024ee2f2c completion: complete --combined-all-paths
  5:  63d70d645e2 =  5:  63d70d645e2 completion: complete --compact-summary
  6:  7296a3a8c9d =  6:  7296a3a8c9d completion: complete --default-prefix
  7:  1f9b213cee5 =  7:  1f9b213cee5 completion: complete --find-copies
  8:  53b1c348f82 =  8:  53b1c348f82 completion: complete --find-object
  9:  053f9e8620a =  9:  053f9e8620a completion: complete --find-renames
 10:  2503d990e5c = 10:  2503d990e5c completion: complete --function-context
 11:  8bd72945a2f = 11:  8bd72945a2f completion: complete --ignore-matching-lines
 12:  5d32e972a0c = 12:  5d32e972a0c completion: complete --irreversible-delete
 13:  fd94e9ae783 = 13:  fd94e9ae783 completion: complete --ita-invisible-in-index and --ita-visible-in-index
 14:  560ad1cd017 = 14:  560ad1cd017 completion: complete --line-prefix
 15:  d3242e1f949 = 15:  d3242e1f949 completion: complete --no-relative
 16:  0f16a466fd9 = 16:  0f16a466fd9 completion: complete --no-stat
 17:  761c75d4aec = 17:  761c75d4aec completion: complete --output
 18:  f8d430639bc = 18:  f8d430639bc completion: complete --output-indicator-{context,new,old}
 19:  807b8201d14 <  -:  ----------- completion: complete --patch-with-raw
 20:  19507b1a210 = 19:  cbf2e59cbea completion: complete --unified
 21:  c78650f215e = 20:  4750951f120 completion: complete --ws-error-highlight
 22:  040248a3868 = 21:  eda4d407ded completion: move --pickaxe-{all,regex} to __git_diff_common_options
 23:  808e7db20cf = 22:  fb23869dfbb completion: complete --diff-merges, its options and --no-diff-merges
 24:  d5fc5b04b00 = 23:  eb9a6a06914 completion: complete --remerge-diff
 25:  da2cc42cbd4 = 24:  47e81c2add6 diff.c: mention completion above add_diff_options
Signature · 1 line
gitgitgadget