#!/bin/bash
LOG_FILE="../merge.log"
+SHA1_FILE="../SHA1s"
build_host="ka2"
build_dir="/scratch/sfr/next"
build_cmd="bin/build_next"
cpwd=../next
-git update-ref "refs/next/$today/akpm-current" akpm/current
git branch -f akpm-current/current akpm/current
git branch -f akpm/base HEAD
GIT_EDITOR=: execute git commit -v -a
execute git diff -M --stat --summary 'HEAD^..'
}
+printf "%s\t%s\n" akpm-current $(git show-ref --hash akpm-current/current) >> $SHA1_FILE
execute git clone -s -l -n -q . ../rebase-tmp || {
echo Clone failed 1>&2
}
log '$' cd ../rebase-tmp
cd ../rebase-tmp
-execute git fetch --no-tags $cpwd refs/heads/akpm/master:akpm || {
- echo Fetch of akpm/master failed 1>&2
- bash -i || exit
-}
-execute git fetch --no-tags $cpwd refs/heads/akpm/master-base:akpm-base || {
- echo Fetch of akpm/master-base failed 1>&2
+execute git checkout -b akpm remotes/origin/akpm/master || {
+ echo Checkout of remotes/origin/akpm/master failed 1>&2
bash -i || exit
}
-execute git checkout akpm || {
- echo Checkout of top failed 1>&2
- bash -i || exit
-}
-execute git rebase --onto master akpm-base || {
+execute git rebase --onto master remotes/origin/akpm/master-base || {
echo Rebase failed 1>&2
bash -i || exit
}
log '$' cd $cpwd
cd $cpwd
execute git fetch -f ../rebase-tmp akpm:akpm/master || {
- echo Pull failed 1>&2
+ echo Fetch of akpm/master failed 1>&2
bash -i || exit
}
execute rm -rf ../rebase-tmp
-git update-ref "refs/next/$today/akpm" akpm/master
-
git branch -f akpm/master-base HEAD
log Merging akpm/master '('$(git log -1 --oneline akpm/master)')'
echo Merge failed 1>&2
bash -i || exit
}
+printf "%s\t\t%s\n" akpm $(git show-ref --hash akpm/master) >> $SHA1_FILE
[ -f "../merge-fixes/akpm" ] && {
for p in $(cat "../merge-fixes/akpm"); do