1
1
using System ;
2
2
using System . Runtime . InteropServices ;
3
+
3
4
namespace LibGit2Sharp . Core
4
5
{
5
6
/// <summary>
@@ -34,10 +35,10 @@ internal class GitFilter
34
35
35
36
/// <summary>
36
37
/// Initialize callback on filter
37
- ///
38
+ ///
38
39
/// Specified as `filter.initialize`, this is an optional callback invoked
39
40
/// before a filter is first used. It will be called once at most.
40
- ///
41
+ ///
41
42
/// If non-NULL, the filter's `initialize` callback will be invoked right
42
43
/// before the first use of the filter, so you can defer expensive
43
44
/// initialization operations (in case libgit2 is being used in a way that doesn't need the filter).
@@ -46,7 +47,7 @@ internal class GitFilter
46
47
47
48
/// <summary>
48
49
/// Shutdown callback on filter
49
- ///
50
+ ///
50
51
/// Specified as `filter.shutdown`, this is an optional callback invoked
51
52
/// when the filter is unregistered or when libgit2 is shutting down. It
52
53
/// will be called once at most and should release resources as needed.
@@ -57,28 +58,28 @@ internal class GitFilter
57
58
/// <summary>
58
59
/// Callback to decide if a given source needs this filter
59
60
/// Specified as `filter.check`, this is an optional callback that checks if filtering is needed for a given source.
60
- ///
61
- /// It should return 0 if the filter should be applied (i.e. success), GIT_PASSTHROUGH if the filter should
61
+ ///
62
+ /// It should return 0 if the filter should be applied (i.e. success), GIT_PASSTHROUGH if the filter should
62
63
/// not be applied, or an error code to fail out of the filter processing pipeline and return to the caller.
63
- ///
64
+ ///
64
65
/// The `attr_values` will be set to the values of any attributes given in the filter definition. See `git_filter` below for more detail.
65
- ///
66
- /// The `payload` will be a pointer to a reference payload for the filter. This will start as NULL, but `check` can assign to this
66
+ ///
67
+ /// The `payload` will be a pointer to a reference payload for the filter. This will start as NULL, but `check` can assign to this
67
68
/// pointer for later use by the `apply` callback. Note that the value should be heap allocated (not stack), so that it doesn't go
68
- /// away before the `apply` callback can use it. If a filter allocates and assigns a value to the `payload`, it will need a `cleanup`
69
+ /// away before the `apply` callback can use it. If a filter allocates and assigns a value to the `payload`, it will need a `cleanup`
69
70
/// callback to free the payload.
70
71
/// </summary>
71
72
public delegate int git_filter_check_fn (
72
73
GitFilter gitFilter , IntPtr payload , IntPtr filterSource , IntPtr attributeValues ) ;
73
74
74
75
/// <summary>
75
76
/// Callback to actually perform the data filtering
76
- ///
77
- /// Specified as `filter.apply`, this is the callback that actually filters data.
77
+ ///
78
+ /// Specified as `filter.apply`, this is the callback that actually filters data.
78
79
/// If it successfully writes the output, it should return 0. Like `check`,
79
- /// it can return GIT_PASSTHROUGH to indicate that the filter doesn't want to run.
80
+ /// it can return GIT_PASSTHROUGH to indicate that the filter doesn't want to run.
80
81
/// Other error codes will stop filter processing and return to the caller.
81
- ///
82
+ ///
82
83
/// The `payload` value will refer to any payload that was set by the `check` callback. It may be read from or written to as needed.
83
84
/// </summary>
84
85
public delegate int git_filter_apply_fn (
@@ -89,7 +90,7 @@ public delegate int git_filter_stream_fn(
89
90
90
91
/// <summary>
91
92
/// Callback to clean up after filtering has been applied. Specified as `filter.cleanup`, this is an optional callback invoked
92
- /// after the filter has been applied. If the `check` or `apply` callbacks allocated a `payload`
93
+ /// after the filter has been applied. If the `check` or `apply` callbacks allocated a `payload`
93
94
/// to keep per-source filter state, use this callback to free that payload and release resources as required.
94
95
/// </summary>
95
96
public delegate void git_filter_cleanup_fn ( IntPtr gitFilter , IntPtr payload ) ;
0 commit comments