From 2b2f070c4aae5789f848a8fe56dead45cd425c34 Mon Sep 17 00:00:00 2001 From: leo Date: Mon, 10 Mar 2025 18:29:11 +0800 Subject: [PATCH] enhance: use `--no-optional-locks` parameter for `git status` command Signed-off-by: leo --- src/Commands/CountLocalChangesWithoutUntracked.cs | 2 +- src/Commands/QueryLocalChanges.cs | 2 +- src/Commands/QuerySubmodules.cs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Commands/CountLocalChangesWithoutUntracked.cs b/src/Commands/CountLocalChangesWithoutUntracked.cs index afb62840..7ab9a54a 100644 --- a/src/Commands/CountLocalChangesWithoutUntracked.cs +++ b/src/Commands/CountLocalChangesWithoutUntracked.cs @@ -8,7 +8,7 @@ namespace SourceGit.Commands { WorkingDirectory = repo; Context = repo; - Args = "status -uno --ignore-submodules=dirty --porcelain"; + Args = "--no-optional-locks status -uno --ignore-submodules=dirty --porcelain"; } public int Result() diff --git a/src/Commands/QueryLocalChanges.cs b/src/Commands/QueryLocalChanges.cs index ea422215..9458e5f5 100644 --- a/src/Commands/QueryLocalChanges.cs +++ b/src/Commands/QueryLocalChanges.cs @@ -13,7 +13,7 @@ namespace SourceGit.Commands { WorkingDirectory = repo; Context = repo; - Args = $"status -u{UNTRACKED[includeUntracked ? 1 : 0]} --ignore-submodules=dirty --porcelain"; + Args = $"--no-optional-locks status -u{UNTRACKED[includeUntracked ? 1 : 0]} --ignore-submodules=dirty --porcelain"; } public List Result() diff --git a/src/Commands/QuerySubmodules.cs b/src/Commands/QuerySubmodules.cs index 6ebfa8b1..1ceccf78 100644 --- a/src/Commands/QuerySubmodules.cs +++ b/src/Commands/QuerySubmodules.cs @@ -49,7 +49,7 @@ namespace SourceGit.Commands if (submodules.Count > 0) { - Args = $"status -uno --porcelain -- {builder}"; + Args = $"--no-optional-locks status -uno --porcelain -- {builder}"; rs = ReadToEnd(); if (!rs.IsSuccess) return submodules;