summaryrefslogtreecommitdiff
path: root/contrib/completion
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2013-06-06 19:18:41 (GMT)
committerJunio C Hamano <gitster@pobox.com>2013-06-06 19:18:41 (GMT)
commit5adb37410198bc1d2413df9100bfd5c9f5d844f2 (patch)
tree88965e2e39df491a944391791c586fd384b210cb /contrib/completion
parent72e719292d5dd6e037fecbc3a1c5e4d4f21f03b8 (diff)
parent1306321ebea4d789974f0d58062664cc35c411e8 (diff)
downloadgit-5adb37410198bc1d2413df9100bfd5c9f5d844f2.zip
git-5adb37410198bc1d2413df9100bfd5c9f5d844f2.tar.gz
git-5adb37410198bc1d2413df9100bfd5c9f5d844f2.tar.bz2
Merge branch 'fc/show-branch-in-rebase-am'
The bash prompt code (in contrib/) displayed the name of the branch being rebased when "rebase -i/-m/-p" modes are in use, but not the plain vanilla "rebase". * fc/show-branch-in-rebase-am: prompt: fix for simple rebase
Diffstat (limited to 'contrib/completion')
-rw-r--r--contrib/completion/git-prompt.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh
index 9f4e6a3..86a4f3f 100644
--- a/contrib/completion/git-prompt.sh
+++ b/contrib/completion/git-prompt.sh
@@ -360,6 +360,7 @@ __git_ps1 ()
step=$(cat "$g/rebase-apply/next")
total=$(cat "$g/rebase-apply/last")
if [ -f "$g/rebase-apply/rebasing" ]; then
+ b="$(cat "$g/rebase-apply/head-name")"
r="|REBASE"
elif [ -f "$g/rebase-apply/applying" ]; then
r="|AM"
@@ -376,6 +377,7 @@ __git_ps1 ()
r="|BISECTING"
fi
+ test -n "$b" ||
b="$(git symbolic-ref HEAD 2>/dev/null)" || {
detached=yes
b="$(