X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=sync.sh;h=e76ce8e55a149d9af664291dfc6032f9fb06f8fb;hb=f8404b8badbb07ea82dd043127838fd7ef562ba9;hp=7ffcd44f652c435882b796e63f86932b66233399;hpb=4240ee37be2576a533b02b1c640e1e42f2788e27;p=config%2Fdotfiles.git diff --git a/sync.sh b/sync.sh index 7ffcd44..e76ce8e 100755 --- a/sync.sh +++ b/sync.sh @@ -26,10 +26,16 @@ for project in `find . -name .git -type d`; do pwd=`pwd` cd "$project" + # Remove .git from repository name. + project=`echo "$project" | sed "s|.git||"` + # 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 @@ -40,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