completion: use __gitcomp_builtin in _git_difftool
Since we can't automatically extract diff options for completion yet, difftool will take all options from $__git_diff_common_options. This brings _a lot_ more completable options to difftool. --ignore-submodules is added to $__git_diff_common_options to avoid regression in difftool. But it's a good thing anyway even for other diff commands. Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
parent
ddced834da
commit
6cc4bc15f9
@ -1394,7 +1394,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
|
||||
--dirstat --dirstat= --dirstat-by-file
|
||||
--dirstat-by-file= --cumulative
|
||||
--diff-algorithm=
|
||||
--submodule --submodule=
|
||||
--submodule --submodule= --ignore-submodules
|
||||
"
|
||||
|
||||
_git_diff ()
|
||||
@ -1435,11 +1435,11 @@ _git_difftool ()
|
||||
return
|
||||
;;
|
||||
--*)
|
||||
__gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
|
||||
--base --ours --theirs
|
||||
--no-renames --diff-filter= --find-copies-harder
|
||||
--relative --ignore-submodules
|
||||
--tool="
|
||||
__gitcomp_builtin difftool "$__git_diff_common_options
|
||||
--base --cached --ours --theirs
|
||||
--pickaxe-all --pickaxe-regex
|
||||
--relative --staged
|
||||
"
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user