qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v2] git: Make submodule check only needed modules


From: Daniel P . Berrangé
Subject: Re: [PATCH v2] git: Make submodule check only needed modules
Date: Thu, 30 Jan 2020 16:31:20 +0000
User-agent: Mutt/1.13.3 (2020-01-12)

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 <address@hidden>
> 
> ---
> 
> 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é <address@hidden>


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 :|




reply via email to

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