completion: support `git range-diff`

Tab completion of `git range-diff` is very convenient, especially given that the revision arguments to specify the commit ranges to compare are typically more complex than, say, what is normally passed to `git log`. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Aug 13, 2018 at 04:33 UTC 7190a67eab181ebfbf61f4c8afaa3a149f685853
1 file changed +14
contrib/completion/git-completion.bash
+14
@@ -1976,6 +1976,20 @@ _git_push ()
1976 __git_complete_remote_or_refspec
1977 }
1978
1979 +_git_range_diff ()
1980 +{
1981 + case "$cur" in
1982 + --*)
1983 + __gitcomp "
1984 + --creation-factor= --dual-color
1985 + $__git_diff_common_options
1986 + "
1987 + return
1988 + ;;
1989 + esac
1990 + __git_complete_revlist
1991 +}
1992 +
1993 _git_rebase ()
1994 {
1995 __git_find_repo_path