From 897484047f90de1c026dc285c4605c03888961d2 Mon Sep 17 00:00:00 2001 From: Hugues Hiegel Date: Tue, 30 Sep 2008 10:51:53 +0200 Subject: Adds a 'rebase' when a rebase is in progress --- 01_Functions.zsh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/01_Functions.zsh b/01_Functions.zsh index 11124de..75be2a3 100644 --- a/01_Functions.zsh +++ b/01_Functions.zsh @@ -70,9 +70,16 @@ get_git_branch () [ "$my_git_branch" == "(no branch)" ] &&\ my_git_branch="($(git-name-rev HEAD 2>&- | awk '{ print $2 }' | sed 's,^tags/,,;s,^remotes/,,'))" - # If neither on a named commit-ish, show abbreviated commit-id - [ "$my_git_branch" == "(undefined)" ] &&\ - my_git_branch="($(git-rev-parse HEAD 2>&-))" + # If neither on a named commit-ish, show commit-id + if [ "$my_git_branch" == "(undefined)" ] + then + if [ -e $(git-rev-parse --git-dir)/.dotest-merge/git-rebase-todo ] + then + my_git_branch="(rebase: $(git-rev-parse HEAD 2>&-))" + else + my_git_branch="($(git-rev-parse HEAD 2>&-))" + fi + fi fi echo $my_git_branch -- cgit v1.2.3