diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-05-29 01:21:28 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-05-29 11:27:56 -0700 |
commit | 1306321ebea4d789974f0d58062664cc35c411e8 (patch) | |
tree | 6bd827689260ccf16400ccb5783e66b5df6ebda3 /contrib/completion/git-prompt.sh | |
parent | edca4152560522a431a51fc0a06147fc680b5b18 (diff) | |
download | git-1306321ebea4d789974f0d58062664cc35c411e8.tar.gz |
prompt: fix for simple rebase
When we are rebasing without options ('am' mode), the head rebased lives
in '$g/rebase-apply/head-name', so lets use that information so it's
reported the same way as if we were doing other rebases (-i or -m).
Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/completion/git-prompt.sh')
-rw-r--r-- | contrib/completion/git-prompt.sh | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/contrib/completion/git-prompt.sh b/contrib/completion/git-prompt.sh index eaf5c369aa..bbf7657142 100644 --- a/contrib/completion/git-prompt.sh +++ b/contrib/completion/git-prompt.sh @@ -279,6 +279,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" @@ -295,6 +296,7 @@ __git_ps1 () r="|BISECTING" fi + test -n "$b" || b="$(git symbolic-ref HEAD 2>/dev/null)" || { detached=yes b="$( |