forked from libgit2/libgit2sharp
-
Notifications
You must be signed in to change notification settings - Fork 1
/
ExplicitPathsOptions.cs
37 lines (34 loc) · 1.16 KB
/
ExplicitPathsOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
using LibGit2Sharp.Handlers;
namespace LibGit2Sharp
{
/// <summary>
/// Allows callers to specify how unmatched paths should be handled
/// by operations such as Reset(), Compare(), Unstage(), ...
/// <para>
/// By passing these options, the passed paths will be treated as
/// explicit paths, and NOT pathspecs containing globs.
/// </para>
/// </summary>
public sealed class ExplicitPathsOptions
{
/// <summary>
/// Associated paths will be treated as explicit paths.
/// </summary>
public ExplicitPathsOptions()
{
ShouldFailOnUnmatchedPath = true;
}
/// <summary>
/// When set to true, the called operation will throw a <see cref="UnmatchedPathException"/> when an unmatched
/// path is encountered.
/// <para>
/// Set to true by default.
/// </para>
/// </summary>
public bool ShouldFailOnUnmatchedPath { get; set; }
/// <summary>
/// Sets a callback that will be called once for each unmatched path.
/// </summary>
public UnmatchedPathHandler OnUnmatchedPath { get; set; }
}
}