Skip to content

Commit 6cc4bc1

Browse files
pcloudsgitster
authored andcommitted
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>
1 parent ddced83 commit 6cc4bc1

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

contrib/completion/git-completion.bash

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1394,7 +1394,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
13941394
--dirstat --dirstat= --dirstat-by-file
13951395
--dirstat-by-file= --cumulative
13961396
--diff-algorithm=
1397-
--submodule --submodule=
1397+
--submodule --submodule= --ignore-submodules
13981398
"
13991399

14001400
_git_diff ()
@@ -1435,11 +1435,11 @@ _git_difftool ()
14351435
return
14361436
;;
14371437
--*)
1438-
__gitcomp "--cached --staged --pickaxe-all --pickaxe-regex
1439-
--base --ours --theirs
1440-
--no-renames --diff-filter= --find-copies-harder
1441-
--relative --ignore-submodules
1442-
--tool="
1438+
__gitcomp_builtin difftool "$__git_diff_common_options
1439+
--base --cached --ours --theirs
1440+
--pickaxe-all --pickaxe-regex
1441+
--relative --staged
1442+
"
14431443
return
14441444
;;
14451445
esac

0 commit comments

Comments
 (0)