From: Simon Ruderich Date: Wed, 18 Feb 2009 20:01:03 +0000 (+0100) Subject: Only print status output if git log did in sync.sh. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=27b94f650cd4d27bbf8bd9fc33030077a675d4d7;p=config%2Fdotfiles.git Only print status output if git log did in sync.sh. --- diff --git a/sync.sh b/sync.sh index 7ffcd44..498a2b3 100755 --- 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