diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2008-06-15 08:08:42 +0300 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2008-06-15 08:08:42 +0300 |
commit | 984ec07c30adfe349504e2ec3071358bdb5e6d8f (patch) | |
tree | dcc8cc534a0152d75433939f329e7d800924de83 /prompt | |
parent | added op state (diff) | |
download | git-prompt-984ec07c30adfe349504e2ec3071358bdb5e6d8f.tar.gz git-prompt-984ec07c30adfe349504e2ec3071358bdb5e6d8f.tar.bz2 git-prompt-984ec07c30adfe349504e2ec3071358bdb5e6d8f.zip |
branch display replaced with symbolic head from `git-name-rev HEAD`
Diffstat (limited to 'prompt')
-rwxr-xr-x | prompt | 14 |
1 files changed, 12 insertions, 2 deletions
@@ -236,7 +236,13 @@ PROMPT_COMMAND=' front=7 head=${PWD:0:$front}"..." - # LOCAL + # LOCALS + # SVN + # ... + + # make + # ... + # GIT git_dir=`git-rev-parse --git-dir 2> /dev/null` if [[ $git_dir ]]; then @@ -318,9 +324,13 @@ PROMPT_COMMAND=' : ${status?prompt internal error: git status} eval git_color="\${git_$status}" + ### head + set `git-name-rev HEAD` + head="$2" + ### compose local label [[ $clean == "clean" ]] || sep=":" - tail_local="$branch${op+/$op}$sep$git_added$git_added_files$git_modified$git_modified_files$git_untracked$git_untracked_files$git_color" + tail_local="$head${op+/$op}$sep$git_added$git_added_files$git_modified$git_modified_files$git_untracked$git_untracked_files$git_color" ### fringes head_local="${head_local+$git_color $head_local\n}" |