summaryrefslogtreecommitdiff
path: root/01_Internal.zsh
diff options
context:
space:
mode:
Diffstat (limited to '01_Internal.zsh')
-rw-r--r--01_Internal.zsh8
1 files changed, 5 insertions, 3 deletions
diff --git a/01_Internal.zsh b/01_Internal.zsh
index 259bde0..c0604af 100644
--- a/01_Internal.zsh
+++ b/01_Internal.zsh
@@ -296,12 +296,14 @@ __get_git_branch ()
onto=$(cat $REBASE_DIR/onto | cut -c-7)
# amended commit
- amend=$(cat $REBASE_DIR/stopped-sha)
- if [ "$amend" != "$(echo $commit_ish | cut -c-7)" ]
+ [ -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 [ "$amend" != "$commit_ish" ]
then
#amend=$(git name-rev --name-only "$amend" 2>/dev/null | __cleanup_git_branch_name)
#[ "$amend" = "undefined" ] &&
- amend=$(cat $REBASE_DIR/stopped-sha)
+ amend=$(echo $amend | cut -c-7)
amend=" ◃ "$C_$color[magenta]$_C$amend$C_$_prompt_colors[soft_generic]$_C
else
amend=""