summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2012-07-07 09:17:50 +0300
committerLeonid Volnitsky <Leonid@Volnitsky.com>2012-07-07 09:17:50 +0300
commitbe207fd5f3665c8299158853d7b5913c046e52cf (patch)
tree182f12b3e3b9db32aedcf99c6d5ebb4b195475a9
parentbetter UTF detection (diff)
downloadgit-prompt-be207fd5f3665c8299158853d7b5913c046e52cf.tar.gz
git-prompt-be207fd5f3665c8299158853d7b5913c046e52cf.tar.bz2
git-prompt-be207fd5f3665c8299158853d7b5913c046e52cf.zip
substitute branch name "master" for "M" only if it starts with "master"
-rwxr-xr-xgit-prompt.sh3
1 files changed, 1 insertions, 2 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index a206eaa..2853909 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -422,7 +422,6 @@ parse_git_status() {
vcs=git
########################################################## GIT STATUS
- file_regex='\([^/ ]*\/\{0,1\}\).*'
added_files=()
modified_files=()
untracked_files=()
@@ -509,7 +508,7 @@ parse_git_status() {
fi
#### branch
- branch=${branch/master/M}
+ branch=${branch/#master/M}
# another method of above:
# branch=$(git symbolic-ref -q HEAD || { echo -n "detached:" ; git name-rev --name-only HEAD 2>/dev/null; } )