3 master_sha1
=`git rev-parse --verify refs/heads/master`
6 (cd .git
/refs
/heads
&& find -type f
) |
9 -e '/^[^\/][^\/]\//p' |
14 echo >&2 "* Skipping $topic"
18 rebase
= done= not_done
= trouble
= date=
19 topic_sha1
=`git rev-parse --verify "refs/heads/$topic"`
22 git rev-list -1 --pretty "$topic" |
23 sed -ne 's/^Date: *\(.*\)/ (\1)/p'
25 only_next_1
=`git rev-list ^master "^$topic" next | sort`
26 only_next_2
=`git rev-list ^master next | sort`
28 if test "$only_next_1" = "$only_next_2"
30 not_in_topic
=`git rev-list "^$topic" master`
31 if test -z "$not_in_topic"
33 :; # already up-to-date.
35 rebase
=" (can be rebased)"
40 echo "Rebasing $topic to pick up:"
41 git rev-list
--pretty=oneline
"^$topic" master |
42 sed -e 's/^[0-9a-f]* / * /'
43 git checkout
"$topic" &&
44 git rebase master ||
break;