]> ruderich.org/simon Gitweb - config/dotfiles.git/blobdiff - sync.sh
Fix leaking a variable in lib.sh.
[config/dotfiles.git] / sync.sh
diff --git a/sync.sh b/sync.sh
index 5745ae57215f7471a897a3f44b3d25fc8f0926b1..e76ce8e55a149d9af664291dfc6032f9fb06f8fb 100755 (executable)
--- a/sync.sh
+++ b/sync.sh
@@ -31,8 +31,11 @@ for project in `find . -name .git -type d`; do
 
     # Display all commits not in the master branch.
     if [ $method = status ]; then
-        echo "status of $project"
-        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
@@ -43,3 +46,8 @@ for project in `find . -name .git -type d`; do
 
     cd "$pwd"
 done
+
+# Run status after a fetch to see new changes.
+if [ $method = fetch ]; then
+    ./sync.sh status
+fi