What changed, and why it matters
This commit simplifies a build-time check that verifies the correct versions of submodules are being used. It does not change what is being checked, only how the result is reported. There is no indication this is a security fix.
No security action needed. Treat as a normal build-system cleanup.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The change refactors the submods-match Makefile target in stm32/shared.mk. Previously it generated two temporary files (sm-want.txt, sm-have.txt) using git submodule status --cached and git submodule status, then diffed them. Now it runs a single git submodule status and uses awk to flag any line not starting with a space (which indicates a mismatch or uninitialized submodule) and exits with failure if any are found. The functional check remains the same: ensure checked-out submodule revisions match the committed .gitmodules/index state.
Changed components
stm32/shared.mkInspect captured patch +4 / −6
diff --git a/stm32/shared.mk b/stm32/shared.mk
index a49de56..013f181 100644
--- a/stm32/shared.mk
+++ b/stm32/shared.mk
@@ -176,12 +176,10 @@ SUBMODULES := $(shell git config --file ../.gitmodules --name-only --get-regex p
SUBMODULES := $(SUBMODULES:submodule.%.path=%)
SUBMODULES := $(filter-out stm32/mk4-bootloader/hal, $(SUBMODULES))
submods-match:
- @echo Submodules: $(SUBMODULES)
- git submodule status --cached $(SUBMODULES:%=../%) > sm-want.txt
- git submodule status $(SUBMODULES:%=../%) > sm-have.txt
- @echo "Submodules: <WANT vs. >HAVE"
- diff sm-want.txt sm-have.txt
- @rm sm-have.txt sm-want.txt
+ @echo Checking submodule revisions: $(SUBMODULES)
+ @git submodule status $(SUBMODULES:%=../%) | awk '\
+ /^[^ ]/ { print; bad=1 } \
+ END { exit bad }'
@echo "Submodules are right revisions."
.PHONY: code-committed
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.