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: a545f2c8b914c2a097c9567d25afc5bd90c362e5 (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 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; }
    }
}