summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xgit-sonar15
1 files changed, 1 insertions, 14 deletions
diff --git a/git-sonar b/git-sonar
index 1978856..d097e12 100755
--- a/git-sonar
+++ b/git-sonar
@@ -10,7 +10,6 @@ GIT_SONAR_VERSION="v0.8.1"
# Original sonar-base
################################################################################
dot_git=""
-cwd=""
remote=""
rcfile_path="$HOME"
@@ -67,20 +66,8 @@ prepare_colors() {
}
-in_current_dir() {
- local wd
- wd="$(pwd)"
- if [[ "$wd" == "$cwd" ]]; then
- cwd="$wd"
- return 0
- else
- cwd="$wd"
- return 1
- fi
-}
-
dot_git() {
- if in_current_dir && [[ -n "$dot_git" ]]; then
+ if [ -n "$dot_git" ]; then
# cache dot_git to save calls to rev-parse
printf '%s' "$dot_git"
elif [ -d .git ]; then