[submodule_update] Don't delete source-of-truth submodules

The `name` field in .gitmodules entries is generated by submodule_update
and is used to map the Jiri project name to the submodule. Therefore,
submodules that don't have corresponding Jiri projects need not have the
`name` field set. So we can use the presence/absence of the `name` field
to determine whether a submodule is the source of truth or whether it's
still being mirrored from Jiri, and don't attempt to delete such
submodules.

Bug: 326595281
Change-Id: Ib8a4a1a95d316380a2d5c2d36a9b40f6d1036331
Reviewed-on: https://fuchsia-review.googlesource.com/c/infra/infra/+/997592
Reviewed-by: Danielle Kay <danikay@google.com>
Commit-Queue: Oliver Newman <olivernewman@google.com>
3 files changed
tree: 8cb5c6c4521841cedce07f9811f1446ee479f75b
  1. artifacts/
  2. buildbucket/
  3. checkout/
  4. cmd/
  5. execution/
  6. flagutil/
  7. functools/
  8. gerrit/
  9. gitiles/
  10. issuetracker/
  11. rpcutil/
  12. scripts/
  13. slsa/
  14. third_party/
  15. vendor/
  16. .gitignore
  17. AUTHORS
  18. go.mod
  19. go.sum
  20. LICENSE
  21. manifest
  22. PATENTS
  23. README.md
README.md

infra

This repo contains tools and config files necessary to run infrastructure related to builds, code review, version control, and continuous integrations.