diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-11-02 13:17:39 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-11-02 13:17:39 -0800 |
commit | b6fb70c985a6fc113e971a6696f328abf8315dce (patch) | |
tree | 4b9e3bfc3f87b29bcf0d64382fae38762d1202ab /contrib | |
parent | Merge branch 'bk/sob-dco' (diff) | |
parent | contrib/completion: complete `git diff --merge-base` (diff) | |
download | tgif-b6fb70c985a6fc113e971a6696f328abf8315dce.tar.xz |
Merge branch 'dl/diff-merge-base'
"git diff A...B" learned "git diff --merge-base A B", which is a
longer short-hand to say the same thing.
* dl/diff-merge-base:
contrib/completion: complete `git diff --merge-base`
builtin/diff-tree: learn --merge-base
builtin/diff-index: learn --merge-base
t4068: add --merge-base tests
diff-lib: define diff_get_merge_base()
diff-lib: accept option flags in run_diff_index()
contrib/completion: extract common diff/difftool options
git-diff.txt: backtick quote command text
git-diff-index.txt: make --cached description a proper sentence
t4068: remove unnecessary >tmp
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/completion/git-completion.bash | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index aea30d74a0..36f5a91c7a 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1698,6 +1698,10 @@ __git_diff_common_options="--stat --numstat --shortstat --summary --patch --no-patch " +__git_diff_difftool_options="--cached --staged --pickaxe-all --pickaxe-regex + --base --ours --theirs --no-index --relative --merge-base + $__git_diff_common_options" + _git_diff () { __git_has_doubledash && return @@ -1720,10 +1724,7 @@ _git_diff () return ;; --*) - __gitcomp "--cached --staged --pickaxe-all --pickaxe-regex - --base --ours --theirs --no-index - $__git_diff_common_options - " + __gitcomp "$__git_diff_difftool_options" return ;; esac @@ -1745,11 +1746,7 @@ _git_difftool () return ;; --*) - __gitcomp_builtin difftool "$__git_diff_common_options - --base --cached --ours --theirs - --pickaxe-all --pickaxe-regex - --relative --staged - " + __gitcomp_builtin difftool "$__git_diff_difftool_options" return ;; esac |