summaryrefslogtreecommitdiff
path: root/prompt
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2008-06-15 11:39:02 +0300
committerLeonid Volnitsky <Leonid@Volnitsky.com>2008-06-15 12:39:16 +0300
commit1841fcac0343983f671f8d07fe34457b2c0318e6 (patch)
tree48539d5eb434b1a627508116a2cade01ca96ba32 /prompt
parentdisplay of "master" replaced with "m" (diff)
downloadgit-prompt-1841fcac0343983f671f8d07fe34457b2c0318e6.tar.gz
git-prompt-1841fcac0343983f671f8d07fe34457b2c0318e6.tar.bz2
git-prompt-1841fcac0343983f671f8d07fe34457b2c0318e6.zip
bug: new files added files were not exteracted - fixed
Diffstat (limited to 'prompt')
-rwxr-xr-xprompt6
1 files changed, 4 insertions, 2 deletions
diff --git a/prompt b/prompt
index 38694a6..e96c573 100755
--- a/prompt
+++ b/prompt
@@ -266,7 +266,8 @@ PROMPT_COMMAND='
/^# Changes to be committed:/,/^# [A-Z]/ {
s/^# Changes to be committed:/added=added/p
- s/# modified: /git_added_files+=\" \"/p
+ s/^# modified: /git_added_files+=\" \"/p
+ s/^# new file: /git_added_files+=\" \"/p
}
"
`
@@ -315,12 +316,13 @@ PROMPT_COMMAND='
status=${status:-$untracked}
# at least one should be set
: ${status?prompt internal error: git status}
- eval git_color=\${git_$status}
+ eval git_color="\${git_$status}"
git_color=${git_color:-$WHITE}
### head
head=`git-name-rev --name-only HEAD 2>/dev/null`
head_rev=`git-rev-parse HEAD 2>/dev/null`
+ head_rev=${head_rev/HEAD/}
head_rev=${head_rev:0:6}
### compose local label