Skip to content

Commit ca5a15e

Browse files
committed
docs: standardize comment block for git_*_init_options functions
1 parent 8ee183a commit ca5a15e

File tree

16 files changed

+157
-84
lines changed

16 files changed

+157
-84
lines changed

include/git2/blame.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,13 @@ typedef struct git_blame_options {
8282
#define GIT_BLAME_OPTIONS_INIT {GIT_BLAME_OPTIONS_VERSION}
8383

8484
/**
85-
* Initializes a `git_blame_options` with default values. Equivalent to
86-
* creating an instance with GIT_BLAME_OPTIONS_INIT.
85+
* Initialize git_blame_options structure
8786
*
88-
* @param opts The `git_blame_options` struct to initialize
89-
* @param version Version of struct; pass `GIT_BLAME_OPTIONS_VERSION`
87+
* Initializes a `git_blame_options` with default values. Equivalent to creating
88+
* an instance with GIT_BLAME_OPTIONS_INIT.
89+
*
90+
* @param opts The `git_blame_options` struct to initialize.
91+
* @param version The struct version; pass `GIT_BLAME_OPTIONS_VERSION`.
9092
* @return Zero on success; -1 on failure.
9193
*/
9294
GIT_EXTERN(int) git_blame_init_options(

include/git2/checkout.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -298,13 +298,15 @@ typedef struct git_checkout_options {
298298
#define GIT_CHECKOUT_OPTIONS_INIT {GIT_CHECKOUT_OPTIONS_VERSION, GIT_CHECKOUT_SAFE}
299299

300300
/**
301-
* Initializes a `git_checkout_options` with default values. Equivalent to
302-
* creating an instance with GIT_CHECKOUT_OPTIONS_INIT.
303-
*
304-
* @param opts the `git_checkout_options` struct to initialize.
305-
* @param version Version of struct; pass `GIT_CHECKOUT_OPTIONS_VERSION`
306-
* @return Zero on success; -1 on failure.
307-
*/
301+
* Initialize git_checkout_options structure
302+
*
303+
* Initializes a `git_checkout_options` with default values. Equivalent to creating
304+
* an instance with GIT_CHECKOUT_OPTIONS_INIT.
305+
*
306+
* @param opts The `git_checkout_options` struct to initialize.
307+
* @param version The struct version; pass `GIT_CHECKOUT_OPTIONS_VERSION`.
308+
* @return Zero on success; -1 on failure.
309+
*/
308310
GIT_EXTERN(int) git_checkout_init_options(
309311
git_checkout_options *opts,
310312
unsigned int version);

include/git2/cherrypick.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,13 @@ typedef struct {
3737
#define GIT_CHERRYPICK_OPTIONS_INIT {GIT_CHERRYPICK_OPTIONS_VERSION, 0, GIT_MERGE_OPTIONS_INIT, GIT_CHECKOUT_OPTIONS_INIT}
3838

3939
/**
40-
* Initializes a `git_cherrypick_options` with default values. Equivalent to
41-
* creating an instance with GIT_CHERRYPICK_OPTIONS_INIT.
40+
* Initialize git_cherrypick_options structure
4241
*
43-
* @param opts the `git_cherrypick_options` struct to initialize
44-
* @param version Version of struct; pass `GIT_CHERRYPICK_OPTIONS_VERSION`
42+
* Initializes a `git_cherrypick_options` with default values. Equivalent to creating
43+
* an instance with GIT_CHERRYPICK_OPTIONS_INIT.
44+
*
45+
* @param opts The `git_cherrypick_options` struct to initialize.
46+
* @param version The struct version; pass `GIT_CHERRYPICK_OPTIONS_VERSION`.
4547
* @return Zero on success; -1 on failure.
4648
*/
4749
GIT_EXTERN(int) git_cherrypick_init_options(

include/git2/clone.h

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,11 +169,13 @@ typedef struct git_clone_options {
169169
GIT_FETCH_OPTIONS_INIT }
170170

171171
/**
172-
* Initializes a `git_clone_options` with default values. Equivalent to
173-
* creating an instance with GIT_CLONE_OPTIONS_INIT.
172+
* Initialize git_clone_options structure
174173
*
175-
* @param opts The `git_clone_options` struct to initialize
176-
* @param version Version of struct; pass `GIT_CLONE_OPTIONS_VERSION`
174+
* Initializes a `git_clone_options` with default values. Equivalent to creating
175+
* an instance with GIT_CLONE_OPTIONS_INIT.
176+
*
177+
* @param opts The `git_clone_options` struct to initialize.
178+
* @param version The struct version; pass `GIT_CLONE_OPTIONS_VERSION`.
177179
* @return Zero on success; -1 on failure.
178180
*/
179181
GIT_EXTERN(int) git_clone_init_options(

include/git2/describe.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ typedef struct git_describe_options {
7070
GIT_DESCRIBE_DEFAULT_MAX_CANDIDATES_TAGS, \
7171
}
7272

73+
/**
74+
* Initialize git_describe_options structure
75+
*
76+
* Initializes a `git_describe_options` with default values. Equivalent to creating
77+
* an instance with GIT_DESCRIBE_OPTIONS_INIT.
78+
*
79+
* @param opts The `git_describe_options` struct to initialize.
80+
* @param version The struct version; pass `GIT_DESCRIBE_OPTIONS_VERSION`.
81+
* @return Zero on success; -1 on failure.
82+
*/
7383
GIT_EXTERN(int) git_describe_init_options(git_describe_options *opts, unsigned int version);
7484

7585
/**
@@ -103,6 +113,16 @@ typedef struct {
103113
GIT_DESCRIBE_DEFAULT_ABBREVIATED_SIZE, \
104114
}
105115

116+
/**
117+
* Initialize git_describe_format_options structure
118+
*
119+
* Initializes a `git_describe_format_options` with default values. Equivalent to creating
120+
* an instance with GIT_DESCRIBE_FORMAT_OPTIONS_INIT.
121+
*
122+
* @param opts The `git_describe_format_options` struct to initialize.
123+
* @param version The struct version; pass `GIT_DESCRIBE_FORMAT_OPTIONS_VERSION`.
124+
* @return Zero on success; -1 on failure.
125+
*/
106126
GIT_EXTERN(int) git_describe_init_format_options(git_describe_format_options *opts, unsigned int version);
107127

108128
/**

include/git2/diff.h

Lines changed: 23 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,13 @@ typedef struct {
437437
{GIT_DIFF_OPTIONS_VERSION, 0, GIT_SUBMODULE_IGNORE_UNSPECIFIED, {NULL,0}, NULL, NULL, NULL, 3}
438438

439439
/**
440-
* Initializes a `git_diff_options` with default values. Equivalent to
441-
* creating an instance with GIT_DIFF_OPTIONS_INIT.
440+
* Initialize git_diff_options structure
442441
*
443-
* @param opts The `git_diff_options` struct to initialize
444-
* @param version Version of struct; pass `GIT_DIFF_OPTIONS_VERSION`
442+
* Initializes a `git_diff_options` with default values. Equivalent to creating
443+
* an instance with GIT_DIFF_OPTIONS_INIT.
444+
*
445+
* @param opts The `git_diff_options` struct to initialize.
446+
* @param version The struct version; pass `GIT_DIFF_OPTIONS_VERSION`.
445447
* @return Zero on success; -1 on failure.
446448
*/
447449
GIT_EXTERN(int) git_diff_init_options(
@@ -732,11 +734,13 @@ typedef struct {
732734
#define GIT_DIFF_FIND_OPTIONS_INIT {GIT_DIFF_FIND_OPTIONS_VERSION}
733735

734736
/**
735-
* Initializes a `git_diff_find_options` with default values. Equivalent to
736-
* creating an instance with GIT_DIFF_FIND_OPTIONS_INIT.
737+
* Initialize git_diff_find_options structure
738+
*
739+
* Initializes a `git_diff_find_options` with default values. Equivalent to creating
740+
* an instance with GIT_DIFF_FIND_OPTIONS_INIT.
737741
*
738-
* @param opts The `git_diff_find_options` struct to initialize
739-
* @param version Version of struct; pass `GIT_DIFF_FIND_OPTIONS_VERSION`
742+
* @param opts The `git_diff_find_options` struct to initialize.
743+
* @param version The struct version; pass `GIT_DIFF_FIND_OPTIONS_VERSION`.
740744
* @return Zero on success; -1 on failure.
741745
*/
742746
GIT_EXTERN(int) git_diff_find_init_options(
@@ -1394,12 +1398,13 @@ GIT_EXTERN(int) git_diff_commit_as_email(
13941398
const git_diff_options *diff_opts);
13951399

13961400
/**
1397-
* Initializes a `git_diff_format_email_options` with default values.
1401+
* Initialize git_diff_format_email_options structure
13981402
*
1399-
* Equivalent to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
1403+
* Initializes a `git_diff_format_email_options` with default values. Equivalent
1404+
* to creating an instance with GIT_DIFF_FORMAT_EMAIL_OPTIONS_INIT.
14001405
*
1401-
* @param opts The `git_diff_format_email_options` struct to initialize
1402-
* @param version Version of struct; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`
1406+
* @param opts The `git_blame_options` struct to initialize.
1407+
* @param version The struct version; pass `GIT_DIFF_FORMAT_EMAIL_OPTIONS_VERSION`.
14031408
* @return Zero on success; -1 on failure.
14041409
*/
14051410
GIT_EXTERN(int) git_diff_format_email_init_options(
@@ -1420,10 +1425,14 @@ typedef struct git_diff_patchid_options {
14201425
#define GIT_DIFF_PATCHID_OPTIONS_INIT { GIT_DIFF_PATCHID_OPTIONS_VERSION }
14211426

14221427
/**
1423-
* Initialize `git_diff_patchid_options` structure.
1428+
* Initialize git_diff_patchid_options structure
14241429
*
1425-
* Initializes the structure with default values. Equivalent to
1430+
* Initializes a `git_diff_patchid_options` with default values. Equivalent to
14261431
* creating an instance with `GIT_DIFF_PATCHID_OPTIONS_INIT`.
1432+
*
1433+
* @param opts The `git_diff_patchid_options` struct to initialize.
1434+
* @param version The struct version; pass `GIT_DIFF_PATCHID_OPTIONS_VERSION`.
1435+
* @return Zero on success; -1 on failure.
14271436
*/
14281437
GIT_EXTERN(int) git_diff_patchid_init_options(
14291438
git_diff_patchid_options *opts,

include/git2/merge.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,12 +203,13 @@ typedef struct {
203203
#define GIT_MERGE_FILE_OPTIONS_INIT {GIT_MERGE_FILE_OPTIONS_VERSION}
204204

205205
/**
206+
* Initialize git_merge_file_options structure
207+
*
206208
* Initializes a `git_merge_file_options` with default values. Equivalent to
207-
* creating an instance with GIT_MERGE_FILE_OPTIONS_INIT.
209+
* creating an instance with `GIT_MERGE_FILE_OPTIONS_INIT`.
208210
*
209-
* @param opts the `git_merge_file_options` instance to initialize.
210-
* @param version the version of the struct; you should pass
211-
* `GIT_MERGE_FILE_OPTIONS_VERSION` here.
211+
* @param opts The `git_merge_file_options` struct to initialize.
212+
* @param version The struct version; pass `GIT_MERGE_FILE_OPTIONS_VERSION`.
212213
* @return Zero on success; -1 on failure.
213214
*/
214215
GIT_EXTERN(int) git_merge_file_init_options(
@@ -300,12 +301,13 @@ typedef struct {
300301
GIT_MERGE_OPTIONS_VERSION, GIT_MERGE_FIND_RENAMES }
301302

302303
/**
304+
* Initialize git_merge_options structure
305+
*
303306
* Initializes a `git_merge_options` with default values. Equivalent to
304-
* creating an instance with GIT_MERGE_OPTIONS_INIT.
307+
* creating an instance with `GIT_MERGE_OPTIONS_INIT`.
305308
*
306-
* @param opts the `git_merge_options` instance to initialize.
307-
* @param version the version of the struct; you should pass
308-
* `GIT_MERGE_OPTIONS_VERSION` here.
309+
* @param opts The `git_merge_options` struct to initialize.
310+
* @param version The struct version; pass `GIT_MERGE_OPTIONS_VERSION`.
309311
* @return Zero on success; -1 on failure.
310312
*/
311313
GIT_EXTERN(int) git_merge_init_options(

include/git2/proxy.h

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,14 @@ typedef struct {
8080
#define GIT_PROXY_OPTIONS_INIT {GIT_PROXY_OPTIONS_VERSION}
8181

8282
/**
83-
* Initialize a proxy options structure
83+
* Initialize git_proxy_options structure
8484
*
85-
* @param opts the options struct to initialize
86-
* @param version the version of the struct, use `GIT_PROXY_OPTIONS_VERSION`
85+
* Initializes a `git_proxy_options` with default values. Equivalent to
86+
* creating an instance with `GIT_PROXY_OPTIONS_INIT`.
87+
*
88+
* @param opts The `git_proxy_options` struct to initialize.
89+
* @param version The struct version; pass `GIT_PROXY_OPTIONS_VERSION`.
90+
* @return Zero on success; -1 on failure.
8791
*/
8892
GIT_EXTERN(int) git_proxy_init_options(git_proxy_options *opts, unsigned int version);
8993

include/git2/rebase.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,13 @@ typedef struct {
147147
} git_rebase_operation;
148148

149149
/**
150+
* Initialize git_rebase_options structure
151+
*
150152
* Initializes a `git_rebase_options` with default values. Equivalent to
151-
* creating an instance with GIT_REBASE_OPTIONS_INIT.
153+
* creating an instance with `GIT_REBASE_OPTIONS_INIT`.
152154
*
153-
* @param opts the `git_rebase_options` instance to initialize.
154-
* @param version the version of the struct; you should pass
155-
* `GIT_REBASE_OPTIONS_VERSION` here.
155+
* @param opts The `git_rebase_options` struct to initialize.
156+
* @param version The struct version; pass `GIT_REBASE_OPTIONS_VERSION`.
156157
* @return Zero on success; -1 on failure.
157158
*/
158159
GIT_EXTERN(int) git_rebase_init_options(

include/git2/remote.h

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -596,12 +596,13 @@ typedef struct {
596596
GIT_REMOTE_DOWNLOAD_TAGS_UNSPECIFIED, GIT_PROXY_OPTIONS_INIT }
597597

598598
/**
599+
* Initialize git_fetch_options structure
600+
*
599601
* Initializes a `git_fetch_options` with default values. Equivalent to
600-
* creating an instance with GIT_FETCH_OPTIONS_INIT.
602+
* creating an instance with `GIT_FETCH_OPTIONS_INIT`.
601603
*
602-
* @param opts the `git_fetch_options` instance to initialize.
603-
* @param version the version of the struct; you should pass
604-
* `GIT_FETCH_OPTIONS_VERSION` here.
604+
* @param opts The `git_fetch_options` struct to initialize.
605+
* @param version The struct version; pass `GIT_FETCH_OPTIONS_VERSION`.
605606
* @return Zero on success; -1 on failure.
606607
*/
607608
GIT_EXTERN(int) git_fetch_init_options(
@@ -645,12 +646,13 @@ typedef struct {
645646
#define GIT_PUSH_OPTIONS_INIT { GIT_PUSH_OPTIONS_VERSION, 0, GIT_REMOTE_CALLBACKS_INIT, GIT_PROXY_OPTIONS_INIT }
646647

647648
/**
649+
* Initialize git_push_options structure
650+
*
648651
* Initializes a `git_push_options` with default values. Equivalent to
649-
* creating an instance with GIT_PUSH_OPTIONS_INIT.
652+
* creating an instance with `GIT_PUSH_OPTIONS_INIT`.
650653
*
651-
* @param opts the `git_push_options` instance to initialize.
652-
* @param version the version of the struct; you should pass
653-
* `GIT_PUSH_OPTIONS_VERSION` here.
654+
* @param opts The `git_push_options` struct to initialize.
655+
* @param version The struct version; pass `GIT_PUSH_OPTIONS_VERSION`.
654656
* @return Zero on success; -1 on failure.
655657
*/
656658
GIT_EXTERN(int) git_push_init_options(

0 commit comments

Comments
 (0)