8000 Introduce StatusOptions.DisablePathSpecMatch · ravindp/libgit2sharp@d61918a · GitHub
[go: up one dir, main page]

Skip to content

Commit d61918a

Browse files
committed
Introduce StatusOptions.DisablePathSpecMatch
1 parent a783913 commit d61918a

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

LibGit2Sharp/RepositoryStatus.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ private static GitStatusOptions CreateStatusOptions(StatusOptions options)
128128
coreOptions.PathSpec = GitStrArrayManaged.BuildFrom(options.PathSpec);
129129
}
130130

131+
if (options.DisablePathSpecMatch)
132+
{
133+
coreOptions.Flags |=
134+
GitStatusOptionFlags.DisablePathspecMatch;
135+
}
136+
131137
return coreOptions;
132138
}
133139

LibGit2Sharp/StatusOptions.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ public StatusOptions()
7070
/// <summary>
7171
/// Limit the scope of paths to consider to the provided pathspecs
7272
/// </summary>
73+
/// <remarks>
74+
/// If a PathSpec is given, the results from rename detection may
75+
/// not be accurate.
76+
/// </remarks>
7377
public string[] PathSpec { get; set; }
78+
79+
/// <summary>
80+
/// When set to <c>true</c>, the PathSpec paths will be considered
81+
/// as explicit paths, and NOT as pathspecs containing globs.
82+
/// </summary>
83+
public bool DisablePathSpecMatch { get; set; }
7484
}
7585
}

0 commit comments

Comments
 (0)
0