Contribute a script to split a given commit range into topic branches
[git/dscho.git] / my-to-dot.sh
blob1f25ca74e44f52025d4910a4d122d587692363e9
1 #!/bin/sh
3 set -e
5 echo "digraph lattice {"
7 shape="shape=Mrecord, style=filled,"
8 git rev-list --pretty=format:"%H %h|%an|%s" "$@" |
9 sed "s/[\"\{\}()<>]/\\\\&/g" |
10 sed -n "s/^\([0-9a-f]\{40\}\) \(.*\)$/n\1 [$shape label=\"{\2}\"]/p"
12 git rev-list --parents "$@" |
13 while read commit parents
15 for p in $parents
17 echo "n$commit -> n$p"
18 done
19 done
21 echo "}"