From patchwork Mon Nov 15 11:48:44 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernhard Kohl X-Patchwork-Id: 71211 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 4A1AEB7108 for ; Mon, 15 Nov 2010 22:51:18 +1100 (EST) Received: from localhost ([127.0.0.1]:50091 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHxaW-0003FO-Uf for incoming@patchwork.ozlabs.org; Mon, 15 Nov 2010 06:51:08 -0500 Received: from [140.186.70.92] (port=48170 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PHxYN-00027T-4E for qemu-devel@nongnu.org; Mon, 15 Nov 2010 06:48:57 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PHxYJ-0004YA-22 for qemu-devel@nongnu.org; Mon, 15 Nov 2010 06:48:55 -0500 Received: from demumfd002.nsn-inter.net ([93.183.12.31]:13312) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PHxYI-0004Xv-QW for qemu-devel@nongnu.org; Mon, 15 Nov 2010 06:48:51 -0500 Received: from demuprx016.emea.nsn-intra.net ([10.150.129.55]) by demumfd002.nsn-inter.net (8.12.11.20060308/8.12.11) with ESMTP id oAFBmlaY012492 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 15 Nov 2010 12:48:47 +0100 Received: from localhost6.localdomain6 ([10.148.17.117]) by demuprx016.emea.nsn-intra.net (8.12.11.20060308/8.12.11) with ESMTP id oAFBmkqm016450; Mon, 15 Nov 2010 12:48:46 +0100 From: Bernhard Kohl To: qemu-devel@nongnu.org Date: Mon, 15 Nov 2010 12:48:44 +0100 Message-Id: <1289821724-24845-1-git-send-email-bernhard.kohl@nsn.com> X-Mailer: git-send-email 1.7.2.3 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4-2.6 Cc: Bernhard Kohl , mtosatti@redhat.com, mst@redhat.com Subject: [Qemu-devel] [PATCH] make-release: fix mtime for a wider range of git versions X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org With the latest git versions, e.g. 1.7.2.3, git still prints out the tag info in addition to the requested format. So let's simply fetch the first line from the output. In addition I use the --pretty option instead of --format which is not recognized in very old git versions, e.g. 1.5.5.6. Tested with git versions 1.5.5.6 and 1.7.2.3. Signed-off-by: Bernhard Kohl --- kvm/scripts/make-release | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kvm/scripts/make-release b/kvm/scripts/make-release index 56302c3..2d050fc 100755 --- a/kvm/scripts/make-release +++ b/kvm/scripts/make-release @@ -51,7 +51,7 @@ cd "$(dirname "$0")"/../.. mkdir -p "$(dirname "$tarball")" git archive --prefix="$name/" --format=tar "$commit" > "$tarball" -mtime=`git show --format=%ct "$commit""^{commit}" --` +mtime=`git show --pretty=format:%ct "$commit""^{commit}" -- | head -n 1` tarargs="--owner=root --group=root" mkdir -p "$tmpdir/$name"