From b444355ea084d9d87e647d62a2a11bd22beb1f43 Mon Sep 17 00:00:00 2001 From: Ruslan Sheptolut <16118228+rsheptolut@users.noreply.github.com> Date: Wed, 2 Dec 2026 18:31:48 +1000 Subject: [PATCH] enhance: skip querying updatable submodules when repository has no `.gitmodules` `AutoUpdateSubmodulesAsync` runs after checkout, create branch, merge, pull and reset, and always spawned `git submodule status`. That command is a shell script on Windows and can take seconds (or much longer under endpoint-security process monitoring) even for repositories without submodules. Reuse the existing `MayHaveSubmodules()` check that `RefreshSubmodules` already uses. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- src/ViewModels/Repository.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ViewModels/Repository.cs b/src/ViewModels/Repository.cs index c2c9a6f322..747b6ecaf7 100644 --- a/src/ViewModels/Repository.cs +++ b/src/ViewModels/Repository.cs @@ -1660,6 +1660,9 @@ public void UpdateSubmodules() public async Task AutoUpdateSubmodulesAsync(Models.ICommandLog log) { + if (!MayHaveSubmodules()) + return; + var submodules = await new Commands.QueryUpdatableSubmodules(FullPath, false).GetResultAsync(); if (submodules.Count == 0) return;