completion: difftool takes both revs and files
authorRamkumar Ramachandra <artagnon@gmail.com>
Sun, 2 Jun 2013 14:03:41 +0000 (19:33 +0530)
committerJunio C Hamano <gitster@pobox.com>
Mon, 3 Jun 2013 17:30:04 +0000 (10:30 -0700)
'git difftool' is clearly a frontend to 'git diff' and is used in
exactly the same way, but it uses a misleadingly named completion
function __git_complete_file. It happens to work only because it
calls __git_complete_revlist_file that completes both revs and
paths.

Change it to use __git_complete_revlist_file, just like 'git diff'.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash
index 1c35eef56a6bd5295f994c2edd12b40db8dfde06..1b4b0f95a9ab2f85581c963dcb055886f5302988 100644 (file)
@@ -1294,7 +1294,7 @@ _git_difftool ()
                return
                ;;
        esac
-       __git_complete_file
+       __git_complete_revlist_file
 }
 
 __git_fetch_options="