X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=topgit.git;a=blobdiff_plain;f=tg-patch.sh;h=97338ab63ef77f52eb876c77ca50b669c458f333;hp=7a2471827d1e27db9a520f51541cecc4dd69c12a;hb=200b39c0f80396f1f7f66c8b33f6adf87ff6edf4;hpb=248720d6e87fd8730bf72683cac3436630af4deb diff --git a/tg-patch.sh b/tg-patch.sh index 7a24718..97338ab 100644 --- a/tg-patch.sh +++ b/tg-patch.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"