[PATCH] git: Make submodule check only needed modules

Juan Quintela posted 1 patch 4 years, 4 months ago
Test docker-quick@centos7 passed
Test FreeBSD passed
Test docker-mingw@fedora passed
Test checkpatch failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200129111906.9815-1-quintela@redhat.com
Maintainers: "Daniel P. Berrangé" <berrange@redhat.com>
There is a newer version of this series
scripts/git-submodule.sh | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
[PATCH] git: Make submodule check only needed modules
Posted by Juan Quintela 4 years, 4 months ago
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>
---
 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..c3e8526e59 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


Re: [PATCH] git: Make submodule check only needed modules
Posted by no-reply@patchew.org 4 years, 4 months ago
Patchew URL: https://patchew.org/QEMU/20200129111906.9815-1-quintela@redhat.com/



Hi,

This series seems to have some coding style problems. See output below for
more information:

Subject: [PATCH] git: Make submodule check only needed modules
Message-id: 20200129111906.9815-1-quintela@redhat.com
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===

From https://github.com/patchew-project/qemu
 * [new tag]         patchew/20200129111906.9815-1-quintela@redhat.com -> patchew/20200129111906.9815-1-quintela@redhat.com
Switched to a new branch 'test'
2f5847c git: Make submodule check only needed modules

=== OUTPUT BEGIN ===
ERROR: code indent should never use tabs
#28: FILE: scripts/git-submodule.sh:63:
+^ICURSTATUS=$($GIT submodule status $module)$

ERROR: code indent should never use tabs
#29: FILE: scripts/git-submodule.sh:64:
+^IOLDSTATUS=$(cat $substat | grep $module)$

ERROR: code indent should never use tabs
#30: FILE: scripts/git-submodule.sh:65:
+^Iif test "$CURSTATUS" != "$OLDSTATUS"; then$

ERROR: code indent should never use tabs
#31: FILE: scripts/git-submodule.sh:66:
+^I    exit 1$

ERROR: code indent should never use tabs
#32: FILE: scripts/git-submodule.sh:67:
+^Ifi$

total: 5 errors, 0 warnings, 18 lines checked

Commit 2f5847c70590 (git: Make submodule check only needed modules) has style problems, please review.  If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===

Test command exited with code: 1


The full log is available at
http://patchew.org/logs/20200129111906.9815-1-quintela@redhat.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com