5 echo "$0: <commit id> [<top tag> [<linus branch>]]" 1>&2
8 commit=$(git rev-parse --verify "$commit")
13 [ "$top" ] || top=HEAD
16 [ "$linus" ] || linus=origin/master
18 base=$(git merge-base "$linus" "$top")
20 git log --first-parent --reverse --pretty='format:%H %P' "$base".."$top" |
23 [ "$p1" = "$commit" ] && {
24 echo "Directly committed"
29 git rev-list $base..$p2 | grep -q "$commit" || continue
30 branch=$(git show $m | sed -n "s/[ ]*Merge .*'\([^']*\)'\( of \([^ ]*\).*\)*$/\1|\3/p")
35 [ "$tree" = "quilt" ] && tree=${branch##*/}