summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugues Hiegel <hugues.hiegel@qosmos.com>2013-08-14 11:23:43 +0200
committerHugues Hiegel <hugues.hiegel@qosmos.com>2013-08-14 11:23:43 +0200
commit17b6350113739fcde3ef4ccb0a7021f3feeede73 (patch)
treef4b45e79c41035be9f7280d704d5d1b51fe16474
parent01120b410711cfc490c7a162a03c03ee56d4bf8b (diff)
[Git] rebase : show pretty names
-rw-r--r--01_Internal.zsh16
1 files changed, 12 insertions, 4 deletions
diff --git a/01_Internal.zsh b/01_Internal.zsh
index b838237..564a4f3 100644
--- a/01_Internal.zsh
+++ b/01_Internal.zsh
@@ -304,17 +304,25 @@ __get_git_branch ()
# ▶ ▷ ▸ ▹ ► ▻ ◀ ◁ ◂ ◃ ◄ ◅
# base
- onto=$(cat $REBASE_DIR/onto | cut -c-7)
+ onto=$(git name-rev --name-only $(cat $REBASE_DIR/onto) | __cleanup_git_branch_name)
# amended commit
- [ -e $REBASE_DIR/original-commit ] && amend=$(cat $REBASE_DIR/original-commit | cut -c-7)
- [ -e $REBASE_DIR/stopped-sha ] && amend=$(cat $REBASE_DIR/stopped-sha)
+ if [ -e $REBASE_DIR/amend ]
+ then
+ amend=$(cat $REBASE_DIR/amend)
+ elif [ -e $REBASE_DIR/original-commit ]
+ then
+ amend=$(cat $REBASE_DIR/original-commit)
+ elif [ -e $REBASE_DIR/stopped-sha ]
+ then
+ amend=$(cat $REBASE_DIR/stopped-sha)
+ fi
#
if [ "$amend" != "$commit_ish" ]
then
#amend=$(git name-rev --name-only "$amend" 2>/dev/null | __cleanup_git_branch_name)
#[ "$amend" = "undefined" ] &&
- amend=$(echo $amend | cut -c-7)
+ amend=$(git name-rev --name-only $amend | __cleanup_git_branch_name)
amend=" ◃ "$C_$color[magenta]$_C$amend$C_$_prompt_colors[soft_generic]$_C
else
amend=""