actually do what the last commit promised
[socialgit.git] / bin / updatebranch
blobaf1089a76d18b76a091db279f9097211ea8947f0
1 #!/bin/sh
2 # updatebranch
4 CURBRANCH=`currentbranchname`
5 git fetch
6 CHANGEDFILES=$(git diff HEAD...FETCH_HEAD | grep "diff --git"|cut -d" " -f3|cut -d"/" -f2-)
8 if [ "`git rev-parse $CURBRANCH`" = "`git merge-base $CURBRANCH origin/$CURBRANCH`" ]; then
9 rebasebranch origin/$CURBRANCH
12 if [[ $CHANGEDFILES ]]; then
13 echo "The following files have been updated:"
14 for filename in $CHANGEDFILES; do
15 echo $filename
16 done