roll: pigweed: pw_env_setup: Add check for git in _check_submodule_presence

If the checkout isn't using git (Cog), don't try updating
git submodules.

Test: confirmed check passes when using git
Test: confirmed check fails when using Cog
Original-Bug: 365557573
Original-Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/234212

https://pigweed.googlesource.com/pigweed/pigweed
pigweed Rolled-Commits: ae663f3530e69e9..16f0f6387505dc2
Roller-URL: https://ci.chromium.org/b/8737252385455484945
GitWatcher: ignore
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I05b6e4757c24946b24b0bf690f6476d728a0e09e
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/showcase/sense/+/234794
Lint: Lint 🤖 <android-build-ayeaye@system.gserviceaccount.com>
Commit-Queue: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
Bot-Commit: Pigweed Roller <pigweed-roller@pigweed-service-accounts.iam.gserviceaccount.com>
diff --git a/MODULE.bazel b/MODULE.bazel
index 26c060b..fcec147 100644
--- a/MODULE.bazel
+++ b/MODULE.bazel
@@ -50,8 +50,8 @@
     module_name = "pigweed",
     # ROLL: Warning: this entry is automatically updated.
     # ROLL: Last updated 2024-09-09.
-    # ROLL: By https://cr-buildbucket.appspot.com/build/8737252780593973937.
-    commit = "ae663f3530e69e9c3114950116c170f3e7a35b9b",
+    # ROLL: By https://cr-buildbucket.appspot.com/build/8737252385455484945.
+    commit = "16f0f6387505dc27e7c1a76387b05524752b4602",
     remote = "https://pigweed.googlesource.com/pigweed/pigweed",
 )
 
@@ -59,8 +59,8 @@
     module_name = "pw_toolchain",
     # ROLL: Warning: this entry is automatically updated.
     # ROLL: Last updated 2024-09-09.
-    # ROLL: By https://cr-buildbucket.appspot.com/build/8737252780593973937.
-    commit = "ae663f3530e69e9c3114950116c170f3e7a35b9b",
+    # ROLL: By https://cr-buildbucket.appspot.com/build/8737252385455484945.
+    commit = "16f0f6387505dc27e7c1a76387b05524752b4602",
     remote = "https://pigweed.googlesource.com/pigweed/pigweed",
     strip_prefix = "pw_toolchain_bazel",
 )