summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2011-05-12 23:52:53 +0300
committerLeonid Volnitsky <Leonid@Volnitsky.com>2011-05-12 23:52:53 +0300
commit4878a77b4790fb2f9eea119818e447ac042dafad (patch)
tree76fad32bc0a72483462709161db87969344e68ad
parent-- (diff)
parentparse_git_status: recognise "Unmerged paths" (diff)
downloadgit-prompt-4878a77b4790fb2f9eea119818e447ac042dafad.tar.gz
git-prompt-4878a77b4790fb2f9eea119818e447ac042dafad.tar.bz2
git-prompt-4878a77b4790fb2f9eea119818e447ac042dafad.zip
Merge branch 'master' of github.com:lvv/git-prompt
-rwxr-xr-xgit-prompt.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/git-prompt.sh b/git-prompt.sh
index f05165a..460d8e3 100755
--- a/git-prompt.sh
+++ b/git-prompt.sh
@@ -444,6 +444,17 @@ parse_git_status() {
s/^# unmerged: '"$file_regex"'/ [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
}
+ /^# Changes not staged for commit:/,/^# [A-Z]/ {
+ s/^# Changes not staged for commit:/modified=modified;/p
+ s/^# modified: '"$file_regex"'/ [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
+ s/^# unmerged: '"$file_regex"'/ [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
+ }
+
+ /^# Unmerged paths:/,/^[^#]/ {
+ s/^# Unmerged paths:/modified=modified;/p
+ s/^# both modified:\s*'"$file_regex"'/ [[ \" ${modified_files[*]} \" =~ \" \1 \" ]] || modified_files[${#modified_files[@]}]=\"\1\"/p
+ }
+
/^# Untracked files:/,/^[^#]/{
s/^# Untracked files:/untracked=untracked;/p
s/^# '"$file_regex"'/ [[ \" ${untracked_files[*]} ${modified_files[*]} ${added_files[*]} \" =~ \" \1 \" ]] || untracked_files[${#untracked_files[@]}]=\"\1\"/p