qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Gerd Hoffmann <kraxel@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: qemu-devel@nongnu.org, famz@redhat.com
Subject: Re: [Qemu-devel] [PATCH] scripts: use git archive in archive-source
Date: Thu, 31 Jan 2019 08:41:43 +0100	[thread overview]
Message-ID: <20190131074143.qw6thiywzrgq7etd@sirius.home.kraxel.org> (raw)
In-Reply-To: <20190130120422.GK15904@redhat.com>

  Hi,

> > +git archive --format tar $HEAD > "$tar_file"
> > +test $? -ne 0 && error "failed to archive qemu"
> >  for sm in $submodules; do
> > -    git submodule update --init $sm
> > -    test $? -ne 0 && error "failed to init submodule $sm"
> > +	git submodule update --init "$sm"
> 
> The current archive-source.sh code is careful to not touch the
> developer's current git checkout, because it runs  submodule
> update in a clone'd tree. The earlier patch hunk gets rid of the
> clone, so now submodule update is touching the developer's master
> git checkout. IMHO this is not acceptable - running tests (which
> use archive-source.sh) must never alter the developer's git checkout
> status in any way.

Can easily be fixed, the sha1 can be pulled out of "git submodule
status" instead of updating the submodules & use HEAD.

The only question is what to do best on uninitialized submodules.
Options are:
 * fetch the submodule into the developer tree (once).
 * clone the submodule into a temporary directory (each run).
 * throw an error.

cheers,
  Gerd

  reply	other threads:[~2019-01-31  7:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-30  6:55 [Qemu-devel] [PATCH] scripts: use git archive in archive-source Gerd Hoffmann
2019-01-30 12:04 ` Daniel P. Berrangé
2019-01-31  7:41   ` Gerd Hoffmann [this message]
2019-01-31 10:26     ` Daniel P. Berrangé
2019-01-31 18:17 ` no-reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190131074143.qw6thiywzrgq7etd@sirius.home.kraxel.org \
    --to=kraxel@redhat.com \
    --cc=berrange@redhat.com \
    --cc=famz@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).