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=b5b92f654116c852ddae266cbacb08765a914dfb;hb=27b380077d91f2b35456d5a7a9fbb5c3b457ab5e;hpb=248720d6e87fd8730bf72683cac3436630af4deb;ds=sidebyside diff --git a/tg-info.sh b/tg-info.sh index b5b92f6..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" @@ -32,7 +32,7 @@ if [ "$(git rev-parse --short "$name")" = "$base_rev" ]; then exit 0 fi -git cat-file blob "$name:.topmsg" | grep ^Subject: +git cat-file blob "$name:.topmsg" | grep ^Subject: || : echo "Base: $base_rev" branch_contains "$name" "$base_rev" ||