Skip to content

Commit dc63c04

Browse files
committed
Merge pull request libgit2#2893 from phatblat/ben/pr/doc-comments
Fix doc comment formatting
2 parents a36486e + c03e8c2 commit dc63c04

File tree

9 files changed

+22
-23
lines changed

9 files changed

+22
-23
lines changed

include/git2/annotated_commit.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ GIT_EXTERN(int) git_annotated_commit_from_ref(
4444
* @param repo repository that contains the given commit
4545
* @param branch_name name of the (remote) branch
4646
* @param remote_url url of the remote
47-
* @param oid the commit object id of the remote branch
47+
* @param id the commit object id of the remote branch
4848
* @return 0 on success or error code
4949
*/
5050
GIT_EXTERN(int) git_annotated_commit_from_fetchhead(
@@ -80,7 +80,7 @@ GIT_EXTERN(int) git_annotated_commit_lookup(
8080
/**
8181
* Gets the commit ID that the given `git_annotated_commit` refers to.
8282
*
83-
* @param head the given annotated commit
83+
* @param commit the given annotated commit
8484
* @return commit id
8585
*/
8686
GIT_EXTERN(const git_oid *) git_annotated_commit_id(
@@ -89,7 +89,7 @@ GIT_EXTERN(const git_oid *) git_annotated_commit_id(
8989
/**
9090
* Frees a `git_annotated_commit`.
9191
*
92-
* @param annotated_commit annotated commit to free
92+
* @param commit annotated commit to free
9393
*/
9494
GIT_EXTERN(void) git_annotated_commit_free(
9595
git_annotated_commit *commit);

include/git2/cherrypick.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ typedef struct {
2929
/** For merge commits, the "mainline" is treated as the parent. */
3030
unsigned int mainline;
3131

32-
git_merge_options merge_opts; /*< Options for the merging */
33-
git_checkout_options checkout_opts; /*< Options for the checkout */
32+
git_merge_options merge_opts; /**< Options for the merging */
33+
git_checkout_options checkout_opts; /**< Options for the checkout */
3434
} git_cherrypick_options;
3535

3636
#define GIT_CHERRYPICK_OPTIONS_VERSION 1

include/git2/config.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,9 @@ typedef enum {
5959
* An entry in a configuration file
6060
*/
6161
typedef struct {
62-
const char *name; /*< Name of the entry (normalised) */
63-
const char *value; /*< String value of the entry */
64-
git_config_level_t level; /*< Which config file this was found in */
62+
const char *name; /**< Name of the entry (normalised) */
63+
const char *value; /**< String value of the entry */
64+
git_config_level_t level; /**< Which config file this was found in */
6565
} git_config_entry;
6666

6767
typedef int (*git_config_foreach_cb)(const git_config_entry *, void *);
@@ -333,7 +333,7 @@ GIT_EXTERN(int) git_config_get_bool(int *out, const git_config *cfg, const char
333333
* @param out the buffer in which to store the result
334334
* @param cfg where to look for the variable
335335
* @param name the variable's name
336-
* @param 0 or an error code
336+
* @return 0 or an error code
337337
*/
338338
GIT_EXTERN(int) git_config_get_path(git_buf *out, const git_config *cfg, const char *name);
339339

include/git2/describe.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ GIT_EXTERN(int) git_describe_commit(
129129
* worktree. After peforming describe on HEAD, a status is run and the
130130
* description is considered to be dirty if there are.
131131
*
132-
* @param result pointer to store the result. You must free this once
132+
* @param out pointer to store the result. You must free this once
133133
* you're done with it.
134134
* @param repo the repository in which to perform the describe
135135
* @param opts the lookup options
@@ -142,9 +142,10 @@ GIT_EXTERN(int) git_describe_workdir(
142142
/**
143143
* Print the describe result to a buffer
144144
*
145+
* @param out The buffer to store the result
145146
* @param result the result from `git_describe_commit()` or
146147
* `git_describe_workdir()`.
147-
* @param opt the formatting options
148+
* @param opts the formatting options
148149
*/
149150
GIT_EXTERN(int) git_describe_format(
150151
git_buf *out,

include/git2/oid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ GIT_EXTERN(void) git_oid_pathfmt(char *out, const git_oid *id);
123123
* will be stored in TLS (i.e. one buffer per thread) to allow for
124124
* concurrent calls of the function.
125125
*
126-
* @param id the oid structure to format
126+
* @param oid The oid structure to format
127127
* @return the c-string
128128
*/
129129
GIT_EXTERN(char *) git_oid_tostr_s(const git_oid *oid);

include/git2/rebase.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ GIT_EXTERN(int) git_rebase_init(
156156
* invocation of `git_rebase_init` or by another client.
157157
*
158158
* @param out Pointer to store the rebase object
159-
* @param reop The repository that has a rebase in-progress
159+
* @param repo The repository that has a rebase in-progress
160160
* @return Zero on success; -1 on failure.
161161
*/
162162
GIT_EXTERN(int) git_rebase_open(git_rebase **out, git_repository *repo);
@@ -195,8 +195,8 @@ GIT_EXTERN(git_rebase_operation *) git_rebase_operation_byindex(
195195
* working directory will be updated with the changes. If there are conflicts,
196196
* you will need to address those before committing the changes.
197197
*
198-
* @param out Pointer to store the rebase operation that is to be performed next
199-
* @param repo The rebase in progress
198+
* @param operation Pointer to store the rebase operation that is to be performed next
199+
* @param rebase The rebase in progress
200200
* @param checkout_opts Options to specify how the patch should be checked out
201201
* @return Zero on success; -1 on failure.
202202
*/
@@ -211,7 +211,7 @@ GIT_EXTERN(int) git_rebase_next(
211211
* invocation.
212212
*
213213
* @param id Pointer in which to store the OID of the newly created commit
214-
* @param repo The rebase that is in-progress
214+
* @param rebase The rebase that is in-progress
215215
* @param author The author of the updated commit, or NULL to keep the
216216
* author from the original commit
217217
* @param committer The committer of the rebase
@@ -255,7 +255,7 @@ GIT_EXTERN(int) git_rebase_abort(
255255
* @param rebase The rebase that is in-progress
256256
* @param signature The identity that is finishing the rebase (optional)
257257
* @param opts Options to specify how rebase is finished
258-
* @param Zero on success; -1 on error
258+
* @return Zero on success; -1 on error
259259
*/
260260
GIT_EXTERN(int) git_rebase_finish(
261261
git_rebase *rebase,

include/git2/revert.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ typedef struct {
2929
/** For merge commits, the "mainline" is treated as the parent. */
3030
unsigned int mainline;
3131

32-
git_merge_options merge_opts; /*< Options for the merging */
33-
git_checkout_options checkout_opts; /*< Options for the checkout */
32+
git_merge_options merge_opts; /**< Options for the merging */
33+
git_checkout_options checkout_opts; /**< Options for the checkout */
3434
} git_revert_options;
3535

3636
#define GIT_REVERT_OPTIONS_VERSION 1

include/git2/transport.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ GIT_EXTERN(int) git_cred_username_new(git_cred **cred, const char *username);
292292
*
293293
* - cred: The newly created credential object.
294294
* - url: The resource for which we are demanding a credential.
295-
* - username_from_url: The username that was embedded in a "user@host"
295+
* - username_from_url: The username that was embedded in a "user\@host"
296296
* remote url, or NULL if not included.
297297
* - allowed_types: A bitmask stating which cred types are OK to return.
298298
* - payload: The payload provided when specifying this callback.

include/git2/types.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,7 @@ typedef struct {
302302
/**
303303
* Callback for the user's custom certificate checks.
304304
*
305-
* @param type The type of certificate or host info, SSH or X.509
306-
* @param data The data for the certificate or host info
307-
* @param len The size of the certificate or host info
305+
* @param cert The host certificate
308306
* @param valid Whether the libgit2 checks (OpenSSL or WinHTTP) think
309307
* this certificate is valid
310308
* @param host Hostname of the host libgit2 connected to

0 commit comments

Comments
 (0)