summaryrefslogtreecommitdiffstats
path: root/git-base.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-03-10 16:33:00 +0000
committerMichael Allen <michael@michaelallen.io>2015-03-10 16:33:00 +0000
commit9bb6cd2e1057e820aba445ec2206df8de69bc961 (patch)
tree8eacfae24ffb765ba36fdddbed89466a397b7c80 /git-base.sh
parent3306e3a3f7acaf488fa199afabcaf99ba31a2204 (diff)
downloadgit-sonar-9bb6cd2e1057e820aba445ec2206df8de69bc961.tar.gz
git-sonar-9bb6cd2e1057e820aba445ec2206df8de69bc961.zip
didn't silence properly
Diffstat (limited to '')
-rwxr-xr-xgit-base.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/git-base.sh b/git-base.sh
index 6d39c5a..f854ae3 100755
--- a/git-base.sh
+++ b/git-base.sh
@@ -206,7 +206,7 @@ conflicted="%{$fg_bold[yellow]%}"
untracked="%{$fg_bold[white]%}"
is_dirty() {
- if ! git rev-parse 2>&1 /dev/null; then
+ if ! git rev-parse &> /dev/null; then
#not in repo, thus not dirty
return 1
else
@@ -216,9 +216,9 @@ is_dirty() {
return 0
else
#no untracked files
- if git show HEAD -- 2>&1 /dev/null; then
+ if git show HEAD -- &> /dev/null; then
#has a commit hash, thus not on an initial commit
- if ! git diff --quiet --ignore-submodules HEAD -- 2>&1 /dev/null; then
+ if ! git diff --quiet --ignore-submodules HEAD -- &> /dev/null; then
#has differences thus dirty
return 0
else