X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?a=blobdiff_plain;f=tg-summary.sh;h=a1f8366ba26f75a35afd59a5a3fb4fa052eb5366;hb=f6f5bcebd1c8833a0126253f21c330b73b77bad0;hp=c608a18fae93d41352d65937cd5dc938846df9ae;hpb=308892d0c071135031994606170c8be6653e7197;p=topgit.git diff --git a/tg-summary.sh b/tg-summary.sh index c608a18..a1f8366 100644 --- a/tg-summary.sh +++ b/tg-summary.sh @@ -14,12 +14,10 @@ fi ## List branches -git for-each-ref | cut -f 2 | +git for-each-ref refs/heads | cut -f 2 | while read ref; do name="${ref#refs/heads/}" - [ "$name" != "$ref" ] || - continue # eew, not a branch - git rev-parse --verify "refs/top-bases/$name" >/dev/null 2>&1 || + base_rev="$(git rev-parse --verify "refs/top-bases/$name" 2>/dev/null)" || continue # not a TopGit branch deps_update=' ' @@ -27,7 +25,7 @@ git for-each-ref | cut -f 2 | base_update=' ' branch_contains "$name" "refs/top-bases/$name" || base_update='B' - if [ "$(git rev-parse "$name")" != "$(git rev-parse "refs/top-bases/$name")" ]; then + if [ "$(git rev-parse "$name")" != "$base_rev" ]; then subject="$(git cat-file blob "$name:.topmsg" | sed -n 's/^Subject: //p')" else # No commits yet