[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] scripts: use git archive in archive-source

From: Gerd Hoffmann
Subject: Re: [Qemu-devel] [PATCH] scripts: use git archive in archive-source
Date: Thu, 31 Jan 2019 08:41:43 +0100
User-agent: NeoMutt/20180716


> > +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.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]