]> ruderich.org/simon Gitweb - config/dotfiles.git/commitdiff
Only print status output if git log did in sync.sh.
authorSimon Ruderich <simon@ruderich.org>
Wed, 18 Feb 2009 20:01:03 +0000 (21:01 +0100)
committerSimon Ruderich <simon@ruderich.org>
Wed, 18 Feb 2009 20:01:03 +0000 (21:01 +0100)
sync.sh

diff --git a/sync.sh b/sync.sh
index 7ffcd44f652c435882b796e63f86932b66233399..498a2b3f894b600bd9deb849b6f8ed676e6f5cde 100755 (executable)
--- a/sync.sh
+++ b/sync.sh
@@ -28,8 +28,11 @@ for project in `find . -name .git -type d`; do
 
     # Display all commits not in the master branch.
     if [ $method = status ]; then
-        echo "$project status"
-        git log --graph --all --pretty=oneline master..
+        output=`git log --graph --all --pretty=oneline --color master..`
+        if [ "x$output" != x ]; then
+            echo "$project status:"
+            echo "$output"
+        fi
     # Fetch from/Push to all remotes.
     else
         for remote in `git remote`; do