]> git.ipfire.org Git - thirdparty/git.git/commit - contrib/completion/git-completion.bash
completion: Support the DWIM mode for git checkout
authorKevin Ballard <kevin@sb.org>
Tue, 12 Oct 2010 21:38:12 +0000 (14:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 13 Oct 2010 23:36:04 +0000 (16:36 -0700)
commit34a6bbb549095544ad8fc9ec29e2c890ef0c27d1
treef4b41b202f2134039a76b6b26ef4de570efd2817
parentc752e7f3e8d96a9673ad248addc9418164bd3ce6
completion: Support the DWIM mode for git checkout

Ever since commit 70c9ac2 (DWIM: "git checkout frotz" to "git checkout
-b frotz origin/frotz"), git checkout has supported a DWIM mode where
it creates a local tracking branch for a remote branch if just the name
of the remote branch is specified on the command-line and only one remote
has a branch with that name. Teach the bash completion script to understand
this DWIM mode and provide such remote-tracking branch names as possible
completions.

Signed-off-by: Kevin Ballard <kevin@sb.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
contrib/completion/git-completion.bash