summaryrefslogtreecommitdiffstats
path: root/git-base.sh
diff options
context:
space:
mode:
authorMichael Allen <michael@michaelallen.io>2015-03-10 16:25:20 +0000
committerMichael Allen <michael@michaelallen.io>2015-03-10 16:25:20 +0000
commitab16bac1dbe8c3c21049b52c5002930f6bde666e (patch)
treea94aadad4094e598242ac453b0e55f5d4e4a91e7 /git-base.sh
parent18c874f385e991552f71b93b9dc68bcdfd7d9c19 (diff)
downloadgit-sonar-ab16bac1dbe8c3c21049b52c5002930f6bde666e.tar.gz
git-sonar-ab16bac1dbe8c3c21049b52c5002930f6bde666e.zip
list files from the root, not current dir
Diffstat (limited to '')
-rwxr-xr-xgit-base.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-base.sh b/git-base.sh
index fbd7ef9..b08c820 100755
--- a/git-base.sh
+++ b/git-base.sh
@@ -227,7 +227,7 @@ is_dirty() {
else
#no commit hash, thus can't use HEAD.
#As it's inital commit we can just list the files.
- if [[ -n "$(ls -a -1 | grep -Ev '(\.|\.\.|\.git)')" ]]; then
+ if [[ -n "$(ls -a -1 "$(git_root)" | grep -Ev '(\.|\.\.|\.git)')" ]]; then
#files listed and no commit hash, thus changes
return 0
else