summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2020-11-02 21:17:39 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-11-02 21:17:39 (GMT)
commitb6fb70c985a6fc113e971a6696f328abf8315dce (patch)
tree4b9e3bfc3f87b29bcf0d64382fae38762d1202ab /contrib
parent761a4e9ab1950fc7b868629ebe478bb41235db45 (diff)
parentcce7d6ecfc45f0d74a95c6ca6447d6e327791348 (diff)
downloadgit-b6fb70c985a6fc113e971a6696f328abf8315dce.zip
git-b6fb70c985a6fc113e971a6696f328abf8315dce.tar.gz
git-b6fb70c985a6fc113e971a6696f328abf8315dce.tar.bz2
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.bash15
1 files changed, 6 insertions, 9 deletions
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index aea30d7..36f5a91 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