Skip to content

Commit cfd3d45

Browse files
committed
Use code formatter and tidy up comments etc
1 parent bbf91a5 commit cfd3d45

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+4696
-4886
lines changed

src/git2/annotated_commit.inc

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
* @return 0 on success or error code
1818
*)
1919

20-
function git_annotated_commit_from_ref(out_: PPgit_annotated_commit;
21-
repo: Pgit_repository; ref: Pgit_reference): Integer; cdecl; external libgit2_dll;
20+
function git_annotated_commit_from_ref(out_: PPgit_annotated_commit; repo: Pgit_repository;
21+
ref: Pgit_reference): Integer; cdecl; external libgit2_dll;
2222

2323
(**
2424
* Creates a `git_annotated_commit` from the given fetch head data.
@@ -33,9 +33,8 @@ function git_annotated_commit_from_ref(out_: PPgit_annotated_commit;
3333
* @return 0 on success or error code
3434
*)
3535

36-
function git_annotated_commit_from_fetchhead(out_: PPgit_annotated_commit;
37-
repo: Pgit_repository; branch_name, remote_url: PAnsiChar; id: Pgit_oid)
38-
: Integer; cdecl; external libgit2_dll;
36+
function git_annotated_commit_from_fetchhead(out_: PPgit_annotated_commit; repo: Pgit_repository; branch_name, remote_url:
37+
PAnsiChar; id: Pgit_oid): Integer; cdecl; external libgit2_dll;
3938

4039
(**
4140
* Creates a `git_annotated_commit` from the given commit id.
@@ -56,8 +55,8 @@ function git_annotated_commit_from_fetchhead(out_: PPgit_annotated_commit;
5655
* @return 0 on success or error code
5756
*)
5857

59-
function git_annotated_commit_lookup(out_: PPgit_annotated_commit;
60-
repo: Pgit_repository; id: Pgit_oid): Integer; cdecl; external libgit2_dll;
58+
function git_annotated_commit_lookup(out_: PPgit_annotated_commit; repo: Pgit_repository;
59+
id: Pgit_oid): Integer; cdecl; external libgit2_dll;
6160

6261
(**
6362
* Creates a `git_annotated_commit` from a revision string.
@@ -72,8 +71,8 @@ function git_annotated_commit_lookup(out_: PPgit_annotated_commit;
7271
* @return 0 on success or error code
7372
*)
7473

75-
function git_annotated_commit_from_revspec(out_: PPgit_annotated_commit;
76-
repo: Pgit_repository; revspec: PAnsiChar): Integer; cdecl; external libgit2_dll;
74+
function git_annotated_commit_from_revspec(out_: PPgit_annotated_commit; repo: Pgit_repository;
75+
revspec: PAnsiChar): Integer; cdecl; external libgit2_dll;
7776

7877
(**
7978
* Gets the commit ID that the given `git_annotated_commit` refers to.
@@ -103,3 +102,5 @@ procedure git_annotated_commit_free(commit: Pgit_annotated_commit); cdecl; exter
103102

104103
(** @} *)
105104

105+
106+

src/git2/apply.inc

Lines changed: 41 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -22,32 +22,30 @@
2222
type
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

3938
type
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

4543
const
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);
5149
type
5250
git_apply_flags_t = Integer;
5351

@@ -61,20 +59,20 @@ type
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

7674
const
77-
GIT_APPLY_OPTIONS_VERSION = 1;
75+
GIT_APPLY_OPTIONS_VERSION = 1;
7876
//GIT_APPLY_OPTIONS_INIT = { GIT_APPLY_OPTIONS_VERSION };
7977

8078
function 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

10098
const
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;
116114
type
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

Comments
 (0)