Skip to content

Commit

Permalink
updates to g2 prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
Olivier Refalo committed Aug 7, 2012
1 parent a4f51ae commit 678ee5c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions g2-prompt.sh
Expand Up @@ -383,7 +383,7 @@ parse_g2_status() {


#### GET THE BRANCH NAME #### GET THE BRANCH NAME
local branch=$("$GIT_EXE" branch | grep "*" | sed "s/* //") local branch=$("$GIT_EXE" branch | grep "*" | sed "s/* //")
branch=${branch/master/M} branch=${branch/#master/M}


# another method of above: # another method of above:
# branch=$(git symbolic-ref -q HEAD || { echo -n "detached:" ; git name-rev --name-only HEAD 2>/dev/null; } ) # branch=$(git symbolic-ref -q HEAD || { echo -n "detached:" ; git name-rev --name-only HEAD 2>/dev/null; } )
Expand All @@ -399,7 +399,7 @@ parse_g2_status() {
branch="<detached:$("$GIT_EXE" name-rev --name-only HEAD 2>/dev/null)" branch="<detached:$("$GIT_EXE" name-rev --name-only HEAD 2>/dev/null)"
elif [[ "$op" ]]; then elif [[ "$op" ]]; then
branch="$op:$branch" branch="$op:$branch"
[[ "$op" = "merge" ]] && branch+="<--$("$GIT_EXE" name-rev --name-only $(<$git_dir/MERGE_HEAD))" [[ "$op" == "merge" ]] && branch+="<--$("$GIT_EXE" name-rev --name-only $(<$git_dir/MERGE_HEAD))"
#branch="<$branch>" #branch="<$branch>"
fi fi
vcs_info="$branch$rawhex" vcs_info="$branch$rawhex"
Expand Down

0 comments on commit 678ee5c

Please sign in to comment.