diff options
| -rwxr-xr-x | git-sonar | 20 |
1 files changed, 4 insertions, 16 deletions
@@ -420,23 +420,11 @@ stashed_status() { printf '%s' "$(git stash list | wc -l 2>/dev/null | grep -oEi '[0-9][0-9]*')" } -is_cwd_a_dot_git_directory() { - if [[ "${1##*/}" == ".git" ]]; then - return 0 - elif [[ -z $1 ]]; then - return 1 - else - is_cwd_a_dot_git_directory "${1%/*}" - fi -} - stash_status() { - if ! is_cwd_a_dot_git_directory "$PWD"; then - local number_stashes - number_stashes="$(stashed_status)" - if [ "$number_stashes" -gt 0 ]; then - printf $PRINT_F_OPTION "${number_stashes}${COLOR_STASH}≡${RESET_COLOR_STASH}" - fi + local number_stashes + number_stashes="$(stashed_status)" + if [ "$number_stashes" -gt 0 ]; then + printf $PRINT_F_OPTION "${number_stashes}${COLOR_STASH}≡${RESET_COLOR_STASH}" fi } |
