Welcome to mirror list, hosted at ThFree Co, Russian Federation.

ExplicitPathsOptions.cs « LibGit2Sharp - github.com/mono/libgit2sharp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 02e81c72dc12e87030a3b14c3152de32195bd68c (plain)
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 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; }
    }
}