From c263301596f83da5c521ea3d0c61e0953c9ae1de Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Mon, 22 Sep 2008 17:24:25 +0200 Subject: [PATCH] tg info, tg patch: Work on top-base HEAD too --- tg-info.sh | 2 +- tg-patch.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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" 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" -- 2.30.2