All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] git: Make submodule check only needed modules
@ 2020-01-30 16:28 Juan Quintela
  2020-01-30 16:31 ` Daniel P. Berrangé
  2020-01-30 17:02 ` no-reply
  0 siblings, 2 replies; 5+ messages in thread
From: Juan Quintela @ 2020-01-30 16:28 UTC (permalink / raw)
  To: qemu-devel; +Cc: Daniel P. Berrangé, Juan Quintela

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"
-- 
2.24.1



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

end of thread, other threads:[~2020-01-30 17:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-01-30 16:28 [PATCH v2] git: Make submodule check only needed modules Juan Quintela
2020-01-30 16:31 ` Daniel P. Berrangé
2020-01-30 16:44   ` Juan Quintela
2020-01-30 16:46     ` Daniel P. Berrangé
2020-01-30 17:02 ` no-reply

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.