From: "Daniel P. Berrangé" <berrange@redhat.com>
To: Juan Quintela <quintela@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [PATCH v2] git: Make submodule check only needed modules
Date: Thu, 30 Jan 2020 16:31:20 +0000 [thread overview]
Message-ID: <20200130163120.GR1891831@redhat.com> (raw)
In-Reply-To: <20200130162810.14503-1-quintela@redhat.com>
On Thu, Jan 30, 2020 at 05:28:10PM +0100, Juan Quintela wrote:
> If one is compiling more than one tree from the same source, it is
> possible that they need different submodules. Change the check to see
> that all modules that we are interested in are updated, discarding the
> ones that we don't care about.
>
> Signed-off-by: Juan Quintela <quintela@redhat.com>
>
> ---
>
> v1->v2:
> patchw insists in not using tabs
> ---
> scripts/git-submodule.sh | 12 ++++++++----
> 1 file changed, 8 insertions(+), 4 deletions(-)
>
> diff --git a/scripts/git-submodule.sh b/scripts/git-submodule.sh
> index 98ca0f2737..65ed877aef 100755
> --- a/scripts/git-submodule.sh
> +++ b/scripts/git-submodule.sh
> @@ -59,10 +59,14 @@ status)
> fi
>
> test -f "$substat" || exit 1
> - CURSTATUS=$($GIT submodule status $modules)
> - OLDSTATUS=$(cat $substat)
> - test "$CURSTATUS" = "$OLDSTATUS"
> - exit $?
> + for module in $modules; do
> + CURSTATUS=$($GIT submodule status $module)
> + OLDSTATUS=$(cat $substat | grep $module)
> + if test "$CURSTATUS" != "$OLDSTATUS"; then
> + exit 1
> + fi
> + done
> + exit 0
> ;;
> update)
> if test -z "$maybe_modules"
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
next prev parent reply other threads:[~2020-01-30 16:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-30 16:28 [PATCH v2] git: Make submodule check only needed modules Juan Quintela
2020-01-30 16:31 ` Daniel P. Berrangé [this message]
2020-01-30 16:44 ` Juan Quintela
2020-01-30 16:46 ` Daniel P. Berrangé
2020-01-30 17:02 ` 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=20200130163120.GR1891831@redhat.com \
--to=berrange@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=quintela@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.