Permalink
Browse files

Fixed looking for dirs with spaces

  • Loading branch information...
1 parent 721f01f commit a7188c4cccdaf68e8cf7fa03ce438c0a41b4a1a6 @erjiang erjiang committed Oct 11, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 git-dude
View
@@ -41,8 +41,8 @@ function notify() {
while true; do
for dir_name in *; do
- if [[ -d $dir_name && $(cd $dir_name; git rev-parse --git-dir 2>/dev/null) ]]; then
- repo_name=$(basename $dir_name .git)
+ if [[ -d "$dir_name" && $(cd "$dir_name"; git rev-parse --git-dir 2>/dev/null) ]]; then
+ repo_name=$(basename "$dir_name" .git)
cd "$dir_name"
changes=$(git fetch 2>&1 | grep -F -- '->' | sed -E 's/^\s+\+\s+//')

0 comments on commit a7188c4

Please sign in to comment.