#!/bin/bash # Update a branch in my GIT tree. If the branch to be updated # is "linus", then pull from kernel.org. Otherwise merge local # linus branch into test|release branch case "$1" in test|release) git checkout $1 && git merge "Auto-update from upstream" $1 linus ;; linus) before=$(cat .git/refs/heads/linus) git fetch linus after=$(cat .git/refs/heads/linus) if [ $before != $after ] then git-whatchanged $after ^$before | git-shortlog fi ;; *) echo "Usage: $0 linus|test|release" 1>&2 exit 1 ;; esac