git-prompt.sh: optionally show upstream branch name
commit1f6806cf2da84e30d162ca3aee15d16db4f1daef
authorJulien Carsique <julien.carsique@gmail.com>
Thu, 10 Oct 2013 14:40:39 +0000 (10 16:40 +0200)
committerJonathan Nieder <jrnieder@gmail.com>
Mon, 14 Oct 2013 17:24:34 +0000 (14 10:24 -0700)
tree04cad91545b03b27c291912029f7df911a7c41b3
parentc5f424fd014488bd8a92b97f52bfe47823bc2128
git-prompt.sh: optionally show upstream branch name

When working with multiple remotes, it is common to switch the upstream
from a remote to another. Doing so, the prompt may not be the expected
one. Providing an option to display tracking information sounds useful.

Add a "name" option to GIT_PS1_SHOWUPSTREAM which will show the upstream
abbrev name. This option is ignored if "verbose" is false.

Signed-off-by: Julien Carsique <julien.carsique@gmail.com>
Improved-by: SZEDER Gábor <szeder@ira.uka.de>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
contrib/completion/git-prompt.sh