]> Nutra Git (v1) - nutratech/cli.git/commitdiff
warn to do a 'git add' when make format changes
authorShane Jaroch <chown_tee@proton.me>
Fri, 12 Apr 2024 20:40:38 +0000 (16:40 -0400)
committerShane Jaroch <chown_tee@proton.me>
Fri, 12 Apr 2024 20:40:38 +0000 (16:40 -0400)
Makefile

index 860aaf418364f18326571f4d5fcec6175eece247..ef61085fa8191cc543d6e5cc51f7ddb801620001 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -85,6 +85,9 @@ format: _venv ## Format with isort & black
 ifneq ($(CHANGED_FILES_PY),)
        isort ${CHANGED_FILES_PY}
        black ${CHANGED_FILES_PY}
+       -git --no-pager diff --stat
+       @echo "OK"
+       @git diff --quiet || echo "NOTE: You may want to run: git add ."
 else
        $(info No changed Python files, skipping.)
 endif