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
cd "$pwd"
done
+
+# Run status after a fetch to see new changes.
+if [ $method = fetch ]; then
+ ./sync.sh status
+fi