X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=blobdiff_plain;f=tg-info.sh;h=7d6a34ca617bc8d6ffc44f81613d30715905688c;hp=17eca60853d6553af370202a6d9095336e1a7580;hb=82f304a9d9a72111fde3127b15537f67df1d6612;hpb=8a6b65bba3976a19a0514f9f1cc7f39ab8fb0403 diff --git a/tg-info.sh b/tg-info.sh index 17eca60..7d6a34c 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" @@ -73,3 +73,5 @@ else echo "Up-to-date." fi rm "$depcheck" + +# vim:noet