public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] make-release: fix mtime for a wider range of git versions
@ 2010-11-15 16:58 Bernhard Kohl
  2010-11-16 22:11 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Bernhard Kohl @ 2010-11-15 16:58 UTC (permalink / raw)
  To: kvm; +Cc: mst, mtosatti, Bernhard Kohl

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 <bernhard.kohl@nsn.com>
---
 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"
-- 
1.7.2.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] make-release: fix mtime for a wider range of git versions
  2010-11-15 16:58 [PATCH] make-release: fix mtime for a wider range of git versions Bernhard Kohl
@ 2010-11-16 22:11 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2010-11-16 22:11 UTC (permalink / raw)
  To: Bernhard Kohl; +Cc: kvm, mst

On Mon, Nov 15, 2010 at 05:58:17PM +0100, Bernhard Kohl wrote:
> 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 <bernhard.kohl@nsn.com>
> ---
>  kvm/scripts/make-release |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Applied, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-11-16 22:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-11-15 16:58 [PATCH] make-release: fix mtime for a wider range of git versions Bernhard Kohl
2010-11-16 22:11 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox