X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=tg-summary.sh;h=af16888c1797db909dbcff7d2ff15c1cf0ec0b28;hb=7aeb4b93b0179788006c17dd59fe5b971c6ad037;hp=32bb6976037ce28b1174a25a0dabe67af95f8b97;hpb=880c0f895759f9b0f35519f2b52e25aa79917b96;p=topgit.git diff --git a/tg-summary.sh b/tg-summary.sh index 32bb697..af16888 100644 --- a/tg-summary.sh +++ b/tg-summary.sh @@ -99,18 +99,21 @@ process_branch() "$name" "$subject" } +if [ -n "$deps" ]; then + list_deps + exit 0 +fi + git for-each-ref refs/top-bases | while read rev type ref; do name="${ref#refs/top-bases/}" if branch_annihilated "$name"; then continue; - fi; + fi if [ -n "$terse" ]; then echo "$name" - continue - fi - if [ -n "$graphviz$sort$deps" ]; then + elif [ -n "$graphviz$sort" ]; then git cat-file blob "$name:.topdeps" | while read dep; do dep_is_tgish=true ref_exists "refs/top-bases/$dep" || @@ -118,17 +121,17 @@ git for-each-ref refs/top-bases | if ! "$dep_is_tgish" || ! branch_annihilated $dep; then if [ -n "$graphviz" ]; then echo "\"$name\" -> \"$dep\";" - elif [ -n "$deps" ]; then - echo "$name $dep" + if [ "$name" = "$curname" ] || [ "$dep" = "$curname" ]; then + echo "\"$curname\" [style=filled,fillcolor=yellow];" + fi else echo "$name $dep" >&4 fi fi done - continue + else + process_branch fi - - process_branch done if [ -n "$graphviz" ]; then