From: Evan Hunt Date: Tue, 19 Mar 2013 02:49:14 +0000 (-0700) Subject: [master] corrct author when cherry-picking X-Git-Tag: v9.10.0a1~448^2~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ad73a77dda93654e707f228e4825f02b10626c01;p=thirdparty%2Fbind9.git [master] corrct author when cherry-picking --- diff --git a/util/branchsync.sh b/util/branchsync.sh index cddc70d8cab..ce6ceb8fbec 100644 --- a/util/branchsync.sh +++ b/util/branchsync.sh @@ -33,6 +33,7 @@ thisbranch () { docommit () { git log -1 --pretty=format:%s%n%b $2 > orig_commit_msg.tmp + author=`git log -1 --pretty=format:"%aN <%aE>" $2` firstline=`head -1 orig_commit_msg.tmp | sed 's/^\[[a-z0-9_]*\] //'` tail -n +2 orig_commit_msg.tmp > remainder.tmp firstline="[$BRANCH] $firstline" @@ -42,7 +43,7 @@ docommit () { echo "hash: $2" >> commit_msg.tmp msg=`cat commit_msg.tmp` rm -f orig_commit_msg.tmp commit_msg.tmp remainder.tmp - git commit --no-verify --no-edit -m "$msg" || exit 1 + git commit --no-verify --no-edit --author="$author" -m "$msg" || exit 1 } BRANCH=`thisbranch` @@ -81,9 +82,9 @@ if [ -z "$continuing" ]; then fi # loop through commits looking for ones that should be cherry-picked -git log $SOURCEBRANCH --reverse --format='%H %aN' $LASTHASH..$SOURCEBRANCH | \ +git log $SOURCEBRANCH --reverse --format='%H' $LASTHASH..$SOURCEBRANCH | \ grep -v Tinderbox | cut -d' ' -f1 | { - while read hash; do + while read hash author; do if git cherry-pick -xn ${hash}; then # cherry-pick was clean # restore the copyrights file