Skip to content

Commit

Permalink
Introduce StatusOptions.DisablePathSpecMatch
Browse files Browse the repository at this point in the history
Therzok committed Nov 19, 2014

Verified

This commit was signed with the committer’s verified signature. The key has expired.
johanlundberg Johan Lundberg
1 parent a783913 commit d61918a
Showing 2 changed files with 16 additions and 0 deletions.
6 changes: 6 additions & 0 deletions LibGit2Sharp/RepositoryStatus.cs
Original file line number Diff line number Diff line change
@@ -128,6 +128,12 @@ private static GitStatusOptions CreateStatusOptions(StatusOptions options)
coreOptions.PathSpec = GitStrArrayManaged.BuildFrom(options.PathSpec);
}

if (options.DisablePathSpecMatch)
{
coreOptions.Flags |=
GitStatusOptionFlags.DisablePathspecMatch;
}

return coreOptions;
}

10 changes: 10 additions & 0 deletions LibGit2Sharp/StatusOptions.cs
Original file line number Diff line number Diff line change
@@ -70,6 +70,16 @@ public StatusOptions()
/// <summary>
/// Limit the scope of paths to consider to the provided pathspecs
/// </summary>
/// <remarks>
/// If a PathSpec is given, the results from rename detection may
/// not be accurate.
/// </remarks>
public string[] PathSpec { get; set; }

/// <summary>
/// When set to <c>true</c>, the PathSpec paths will be considered
/// as explicit paths, and NOT as pathspecs containing globs.
/// </summary>
public bool DisablePathSpecMatch { get; set; }
}
}

0 comments on commit d61918a

Please sign in to comment.