summaryrefslogtreecommitdiff
path: root/update-server-info.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-05-10 08:53:19 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-05-17 02:46:31 (GMT)
commitff790b6a4bb7fa3bbccd5ea23cefd89da900aa2e (patch)
tree2c8d980e4b12acacca638b5fcc6e2b08d34f251f /update-server-info.c
parent8763dbb1b24c260243f69130c734c13563a16db6 (diff)
downloadgit-ff790b6a4bb7fa3bbccd5ea23cefd89da900aa2e.zip
git-ff790b6a4bb7fa3bbccd5ea23cefd89da900aa2e.tar.gz
git-ff790b6a4bb7fa3bbccd5ea23cefd89da900aa2e.tar.bz2
completion: simplify "current branch" in __git_ps1()
As I very often work on a detached HEAD, I found it pretty confusing when __git_ps1() said 'some-name'. Did I create a branch with that name by mistake, or do I happen to be on a commit with that exact tag? This patch fixes the issue by enclosing non branch names in a pair of parentheses when used to substitute %s token in __git_ps1() argument. It also fixes a small bug where the branch part is left empty when .git/HEAD is unreadable for whatever reason. The output now says "(unknown)". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'update-server-info.c')
0 files changed, 0 insertions, 0 deletions