diff options
author | Leonid Volnitsky <Leonid@Volnitsky.com> | 2009-06-01 08:01:40 +0300 |
---|---|---|
committer | Leonid Volnitsky <Leonid@Volnitsky.com> | 2009-06-01 08:07:58 +0300 |
commit | 43cc27af3d972263a33d3833410aa9c4a72931c4 (patch) | |
tree | c5f7dd81cd39ed63c2bf85444080649dd0a50707 /git-prompt.sh | |
parent | -- dir, docs cleanup (diff) | |
download | git-prompt-43cc27af3d972263a33d3833410aa9c4a72931c4.tar.gz git-prompt-43cc27af3d972263a33d3833410aa9c4a72931c4.tar.bz2 git-prompt-43cc27af3d972263a33d3833410aa9c4a72931c4.zip |
fixed (for parse_git_status() only): files from parent directiry were shown in file list
Diffstat (limited to 'git-prompt.sh')
-rwxr-xr-x | git-prompt.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/git-prompt.sh b/git-prompt.sh index e3ca24d..cab5530 100755 --- a/git-prompt.sh +++ b/git-prompt.sh @@ -331,12 +331,20 @@ parse_git_status() { /^# Changed but not updated:/,/^# [A-Z]/ { s/^# Changed but not updated:/modified=modified;/p + s/^# modified: \.\./: SKIP/ s/^# modified: \(.*\)/modified_files[${#modified_files[@]}+1]=\"\1\"/p + s/^# unmerged: \.\./: SKIP/ s/^# unmerged: \(.*\)/modified_files[${#modified_files[@]}+1]=\"\1\"/p } /^# Changes to be committed:/,/^# [A-Z]/ { s/^# Changes to be committed:/added=added;/p + + s/^# modified: \.\./: SKIP/ + s/^# new file: \.\./: SKIP/ + s/^# renamed:[^>]*> \.\./: SKIP/ + s/^# copied:[^>]*> \.\./: SKIP/ + s/^# modified: \(.*\)/added_files[${#added_files[@]}+1]=\"\1\"/p s/^# new file: \(.*\)/added_files[${#added_files[@]}+1]=\"\1\"/p s/^# renamed:[^>]*> \(.*\)/added_files[${#added_files[@]}+1]=\"\1\"/p |