From ab571c1f5b79183068f11d83888ecd9c5b8f8cd4 Mon Sep 17 00:00:00 2001 From: Evan Hunt Date: Mon, 9 Sep 2013 10:34:48 -0700 Subject: [PATCH] [master] make sure both tags and branches work with kit.sh --- util/kit.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/util/kit.sh b/util/kit.sh index cd0d905c9a..6c6d7f3ed4 100644 --- a/util/kit.sh +++ b/util/kit.sh @@ -124,6 +124,13 @@ mkdir $topdir || exit 1 git archive --format=tar $remote $tag | ( cd $topdir; tar xf -) shorthash=`git ls-remote $repo refs/heads/$tag | cut -c1-8` +if [ -z "$shorthash" ]; then + shorthash=`git ls-remote $repo refs/tags/$tag | cut -c1-8` +fi +if [ -z "$shorthash" ]; then + echo "Unable to determine hash for $tag, aborting." + exit 1 +fi cd $topdir || exit 1