chiark / gitweb /
tg info, tg patch: Work on top-base HEAD too
authorPetr Baudis <pasky@suse.cz>
Mon, 22 Sep 2008 15:24:25 +0000 (17:24 +0200)
committerPetr Baudis <pasky@suse.cz>
Mon, 22 Sep 2008 15:24:25 +0000 (17:24 +0200)
tg-info.sh
tg-patch.sh

index 17eca60..9076247 100644 (file)
@@ -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"
 
index 7a24718..97338ab 100644 (file)
@@ -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"