X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;ds=sidebyside;f=tg-summary.sh;h=3905bdce7dc1d934a7862c025c4fb772c52660d6;hb=67ae5b2708ea78bf3d9eaa21cb4f0096cfeb4012;hp=4ffebcefda524f434860306779cd541d21477af5;hpb=2d9d79af9f312dbf94a848e3570f57002f6fb2b6;p=topgit.git diff --git a/tg-summary.sh b/tg-summary.sh index 4ffebce..3905bdc 100644 --- a/tg-summary.sh +++ b/tg-summary.sh @@ -3,13 +3,21 @@ # (c) Petr Baudis 2008 # GPLv2 +terse= + ## Parse options -if [ -n "$1" ]; then - echo "Usage: tg summary" >&2 - exit 1 -fi +while [ -n "$1" ]; do + arg="$1"; shift + case "$arg" in + -t) + terse=1;; + *) + echo "Usage: tg [...] summary [-t]" >&2 + exit 1;; + esac +done curname="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')" @@ -19,6 +27,11 @@ curname="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')" git for-each-ref refs/top-bases | while read rev type ref; do name="${ref#refs/top-bases/}" + if [ -n "$terse" ]; then + echo "$name" + continue + fi + missing_deps= current=' '