summaryrefslogtreecommitdiff
path: root/prompt
diff options
context:
space:
mode:
authorLeonid Volnitsky <Leonid@Volnitsky.com>2008-06-15 07:47:33 +0300
committerLeonid Volnitsky <Leonid@Volnitsky.com>2008-06-15 07:47:33 +0300
commitc4b8b0fce25a507212338687525626d62835bb71 (patch)
tree2c8b808f3609fcd550a73dd3fe4ffad3d52d5a70 /prompt
parent$GIT_DIR used (diff)
downloadgit-prompt-c4b8b0fce25a507212338687525626d62835bb71.tar.gz
git-prompt-c4b8b0fce25a507212338687525626d62835bb71.tar.bz2
git-prompt-c4b8b0fce25a507212338687525626d62835bb71.zip
git-rev-parse --git-dir used to detect .dir path
Diffstat (limited to 'prompt')
-rwxr-xr-xprompt3
1 files changed, 2 insertions, 1 deletions
diff --git a/prompt b/prompt
index bf3883d..344feec 100755
--- a/prompt
+++ b/prompt
@@ -234,7 +234,8 @@ PROMPT_COMMAND='
# LOCAL
# GIT
- if [[ -n $DIT_DIR && -d $GIT_DIR || -d .git || -d ../.git || -d ../../.git ]]; then
+ git_dir=`git-rev-parse --git-dir 2> /dev/null`
+ if [[ $git_dir ]]; then
### status
# clean(blue) nothing to commit (working directory clean)