5 # Act as editor, to filter out commits with Junio as committer; This should
6 # work around the problems of junio/next rebasing every once in a while.
11 if test -n "$MY_EXCLUDE"
13 git rev-list
$TO..
$MY_EXCLUDE > "$1".exclude
18 while read command sha1 oneline
20 # skip history obsoleted by a previous rebasing merge
21 if grep ^
$sha1 "$1".exclude
> /dev
/null
27 echo "$command $sha1 $oneline"
31 committer
="$(git show -s --format=%cn $sha1)" &&
33 "Junio C Hamano"|
"Junio Hamano"|
"Shawn O. Pearce"|
"Eric Wong"|
"Thomas Rast"|
"Jeff King"|
"Paul Mackerras") ;; # skip
34 *) echo "$command $sha1 (committer: $committer) $oneline"
36 done > "$1" < "$1".bup
40 "$(git var GIT_EDITOR)" "$@"
44 # Rebase 'devel' on top of 'junio/next', the merging the old state of
45 # 'devel' with the merge strategy 'ours' to enable a fast-forward.
47 this
="$(cd "$
(dirname "$0")" && pwd)/$(basename "$0")" &&
49 case "$(git rev-parse --symbolic-full-name HEAD)" in
51 test "$(git rev-parse HEAD)" = "$(git rev-parse origin/devel)" ||
52 test "$(git rev-parse devel@{1})" = "$(git rev-parse origin/devel)" ||
{
53 echo "Your 'devel' is not up-to-date!" >&2
59 echo "Not on 'devel'!" >&2
64 JUNIOS_HEAD
=$
(git rev-parse
$TO) &&
65 if test $JUNIOS_HEAD != $
(git merge-base HEAD
$JUNIOS_HEAD)
67 rebasing_merge
="$(git rev-list --parents $TO..HEAD |
68 while read commit parent1 parent2
71 commit_tree="$
(git rev-parse
$commit:)" &&
72 parent1_tree="$
(git rev-parse
$parent1:)" &&
73 test "$commit_tree" = "$parent1_tree" ||
78 if test -z "$rebasing_merge"
80 GIT_EDITOR
="$this" MY_EXCLUDE
= git rebase
-i $TO
83 MY_EXCLUDE
=$rebasing_merge^
2 \
84 git rebase
-i --onto $TO \
85 $
(git merge-base
$rebasing_merge^
$TO)
88 git merge
-s ours
-m "Rebasing merge to $TO" origin
/devel