X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=sync.sh;h=e76ce8e55a149d9af664291dfc6032f9fb06f8fb;hb=f8404b8badbb07ea82dd043127838fd7ef562ba9;hp=5745ae57215f7471a897a3f44b3d25fc8f0926b1;hpb=353ee0e6fa2eb8a5a61bd263a588670c1570bb0b;p=config%2Fdotfiles.git diff --git a/sync.sh b/sync.sh index 5745ae5..e76ce8e 100755 --- 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