Skip to content

Commit 2b2f070

Browse files
committed
enhance: use --no-optional-locks parameter for git status command
Signed-off-by: leo <[email protected]>
1 parent e65cb50 commit 2b2f070

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Commands/CountLocalChangesWithoutUntracked.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public CountLocalChangesWithoutUntracked(string repo)
88
{
99
WorkingDirectory = repo;
1010
Context = repo;
11-
Args = "status -uno --ignore-submodules=dirty --porcelain";
11+
Args = "--no-optional-locks status -uno --ignore-submodules=dirty --porcelain";
1212
}
1313

1414
public int Result()

src/Commands/QueryLocalChanges.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public QueryLocalChanges(string repo, bool includeUntracked = true)
1313
{
1414
WorkingDirectory = repo;
1515
Context = repo;
16-
Args = $"status -u{UNTRACKED[includeUntracked ? 1 : 0]} --ignore-submodules=dirty --porcelain";
16+
Args = $"--no-optional-locks status -u{UNTRACKED[includeUntracked ? 1 : 0]} --ignore-submodules=dirty --porcelain";
1717
}
1818

1919
public List<Models.Change> Result()

src/Commands/QuerySubmodules.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public QuerySubmodules(string repo)
4949

5050
if (submodules.Count > 0)
5151
{
52-
Args = $"status -uno --porcelain -- {builder}";
52+
Args = $"--no-optional-locks status -uno --porcelain -- {builder}";
5353
rs = ReadToEnd();
5454
if (!rs.IsSuccess)
5555
return submodules;

0 commit comments

Comments
 (0)