+while [ -n "$1" ]; do
+ arg="$1"; shift
+ case "$arg" in
+ -t)
+ terse=1;;
+ --graphviz)
+ graphviz=1;;
+ --sort)
+ sort=1;;
+ *)
+ echo "Usage: tg [...] summary [-t | --sort | --graphviz]" >&2
+ exit 1;;
+ esac
+done
+
+curname="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')"
+
+! [ -n "$terse" -a -n "$graphviz" ] ||
+ die "-t and --graphviz options are mutual exclusive"
+
+! [ -n "$sort" -a -n "$graphviz" ] ||
+ die "--sort and --graphviz options are mutual exclusive"
+
+! [ -n "$sort" -a -n "$terse" ] ||
+ die "-t and --sort options are mutual exclusive"
+
+if [ -n "$graphviz" ]; then
+ cat <<EOT
+# GraphViz output; pipe to:
+# | dot -Tpng -o <ouput>
+# or
+# | dot -Txlib
+
+digraph G {
+
+graph [
+ rankdir = "TB"
+ label="TopGit Layout\n\n\n"
+ fontsize = 14
+ labelloc=top
+ pad = "0.5,0.5"
+];
+
+EOT