X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=blobdiff_plain;f=tg-info.sh;h=90762479eb44f3b0ef2f366fc4a7865e05087c76;hp=17eca60853d6553af370202a6d9095336e1a7580;hb=5aa8cf9d4fba8b6dbbd7878eb78b2600e3736b9a;hpb=8a6b65bba3976a19a0514f9f1cc7f39ab8fb0403 diff --git a/tg-info.sh b/tg-info.sh index 17eca60..9076247 100644 --- a/tg-info.sh +++ b/tg-info.sh @@ -20,7 +20,7 @@ while [ -n "$1" ]; do esac done -[ -n "$name" ] || name="$(git symbolic-ref HEAD | sed 's#^refs/heads/##')" +[ -n "$name" ] || name="$(git symbolic-ref HEAD | sed 's#^refs/\(heads\|top-bases\)/##')" base_rev="$(git rev-parse --short --verify "refs/top-bases/$name" 2>/dev/null)" || die "not a TopGit-controlled branch"