2222type
2323 git_apply_delta_cb = function(delta: Pgit_diff_delta; payload: Pointer): Integer; cdecl;
2424
25-
26- (* *
27- * When applying a patch, callback that will be made per hunk.
28- *
29- * When the callback:
30- * - returns < 0, the apply process will be aborted.
31- * - returns > 0, the hunk will not be applied, but the apply process
32- * continues
33- * - returns 0, the hunk is applied, and the apply process continues.
34- *
35- * @param hunk The hunk to be applied
36- * @param payload User-specified payload
37- *)
25+ (* *
26+ * When applying a patch, callback that will be made per hunk.
27+ *
28+ * When the callback:
29+ * - returns < 0, the apply process will be aborted.
30+ * - returns > 0, the hunk will not be applied, but the apply process
31+ * continues
32+ * - returns 0, the hunk is applied, and the apply process continues.
33+ *
34+ * @param hunk The hunk to be applied
35+ * @param payload User-specified payload
36+ *)
3837
3938type
4039 git_apply_hunk_cb = function(hunk: Pgit_diff_hunk; payload: Pointer): Integer; cdecl;
4140
42-
43- (* * Flags controlling the behavior of git_apply *)
41+ (* * Flags controlling the behavior of git_apply *)
4442
4543const
4644 (* *
47- * Don't actually make changes, just test that the patch applies.
48- * This is the equivalent of `git apply --check`.
49- *)
50- GIT_APPLY_CHECK = ( 1 shl 0 );
45+ * Don't actually make changes, just test that the patch applies.
46+ * This is the equivalent of `git apply --check`.
47+ *)
48+ GIT_APPLY_CHECK = (1 shl 0 );
5149type
5250 git_apply_flags_t = Integer;
5351
6159 *)
6260
6361 git_apply_options = record
64- version : Cardinal; (* *< The version *)
62+ version: Cardinal; (* *< The version *)
6563 (* * When applying a patch, callback that will be made per delta (file). *)
66- delta_cb : git_apply_delta_cb;
64+ delta_cb: git_apply_delta_cb;
6765 (* * When applying a patch, callback that will be made per hunk. *)
68- hunk_cb : git_apply_hunk_cb;
66+ hunk_cb: git_apply_hunk_cb;
6967 (* * Payload passed to both delta_cb & hunk_cb. *)
70- payload : Pointer;
68+ payload: Pointer;
7169 (* * Bitmask of git_apply_flags_t *)
72- flags : Cardinal;
70+ flags: Cardinal;
7371 end ;
7472 Pgit_apply_options = ^git_apply_options;
7573
7674const
77- GIT_APPLY_OPTIONS_VERSION = 1 ;
75+ GIT_APPLY_OPTIONS_VERSION = 1 ;
7876 // GIT_APPLY_OPTIONS_INIT = { GIT_APPLY_OPTIONS_VERSION };
7977
8078function git_apply_options_init (opts: Pgit_apply_options; version: Cardinal)
@@ -92,27 +90,27 @@ function git_apply_options_init(opts: Pgit_apply_options; version: Cardinal)
9290 * @return 0 or an error code
9391 *)
9492
95- function git_apply_to_tree (out_: PPgit_index; repo: Pgit_repository;
96- preimage: Pgit_tree; diff: Pgit_diff; options: Pgit_apply_options): Integer; cdecl; external libgit2_dll;
93+ function git_apply_to_tree (out_: PPgit_index; repo: Pgit_repository; preimage: Pgit_tree; diff: Pgit_diff; options:
94+ Pgit_apply_options): Integer; cdecl; external libgit2_dll;
9795
9896(* * Possible application locations for git_apply *)
9997
10098const
10199 (* *
102- * Apply the patch to the workdir, leaving the index untouched.
103- * This is the equivalent of `git apply` with no location argument.
104- *)
105- GIT_APPLY_LOCATION_WORKDIR = 0 ;
100+ * Apply the patch to the workdir, leaving the index untouched.
101+ * This is the equivalent of `git apply` with no location argument.
102+ *)
103+ GIT_APPLY_LOCATION_WORKDIR = 0 ;
106104 (* *
107- * Apply the patch to the index, leaving the working directory
108- * untouched. This is the equivalent of `git apply --cached`.
109- *)
110- GIT_APPLY_LOCATION_INDEX = 1 ;
105+ * Apply the patch to the index, leaving the working directory
106+ * untouched. This is the equivalent of `git apply --cached`.
107+ *)
108+ GIT_APPLY_LOCATION_INDEX = 1 ;
111109 (* *
112- * Apply the patch to both the working directory and the index.
113- * This is the equivalent of `git apply --index`.
114- *)
115- GIT_APPLY_LOCATION_BOTH = 2 ;
110+ * Apply the patch to both the working directory and the index.
111+ * This is the equivalent of `git apply --index`.
112+ *)
113+ GIT_APPLY_LOCATION_BOTH = 2 ;
116114type
117115 git_apply_location_t = Integer;
118116
@@ -127,8 +125,10 @@ type
127125 * @return 0 or an error code
128126 *)
129127
130- function git_apply (repo: Pgit_repository; diff: Pgit_diff;
131- location: git_apply_location_t; options: Pgit_apply_options): Integer; cdecl; external libgit2_dll;
128+ function git_apply (repo: Pgit_repository; diff: Pgit_diff; location: git_apply_location_t; options: Pgit_apply_options): Integer;
129+ cdecl; external libgit2_dll;
132130
133131(* * @} *)
134132
133+
134+
0 commit comments