Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e196716

Browse files
committed
Fixed most documentation header bugs
Fixed a few header @param and @return typos with the help of -Wdocumentation in Xcode. The following warnings have not been fixed: common.h:213 - Not sure how the documentation format is for '...' notes.h:102 - Correct @param name but empty text notes.h:111 - Correct @param name but empty text pack.h:140 - @return missing text pack.h:148 - @return missing text
1 parent 9f1b2c5 commit e196716

17 files changed

+35
-35
lines changed

include/git2/attr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ GIT_EXTERN(int) git_attr_get(
162162
* Then you could loop through the 3 values to get the settings for
163163
* the three attributes you asked about.
164164
*
165-
* @param values An array of num_attr entries that will have string
165+
* @param values_out An array of num_attr entries that will have string
166166
* pointers written into it for the values of the attributes.
167167
* You should not modify or free the values that are written
168168
* into this array (although of course, you should free the

include/git2/commit.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ GIT_EXTERN(int) git_commit_nth_gen_ancestor(
235235
*
236236
* @param parent_count Number of parents for this commit
237237
*
238-
* @param parents[] Array of `parent_count` pointers to `git_commit`
238+
* @param parents Array of `parent_count` pointers to `git_commit`
239239
* objects that will be used as the parents for this commit. This
240240
* array may be NULL if `parent_count` is 0 (root commit). All the
241241
* given commits must be owned by the `repo`.

include/git2/config.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ GIT_EXTERN(int) git_config_find_xdg(char *out, size_t length);
119119
* If /etc/gitconfig doesn't exist, it will look for
120120
* %PROGRAMFILES%\Git\etc\gitconfig.
121121
122-
* @param global_config_path Buffer to store the path in
122+
* @param out Buffer to store the path in
123123
* @param length size of the buffer in bytes
124124
* @return 0 if a system configuration file has been
125125
* found. Its path will be stored in `buffer`.
@@ -335,8 +335,8 @@ GIT_EXTERN(int) git_config_get_string(const char **out, const git_config *cfg, c
335335
* @param name the variable's name
336336
* @param regexp regular expression to filter which variables we're
337337
* interested in. Use NULL to indicate all
338-
* @param fn the function to be called on each value of the variable
339-
* @param data opaque pointer to pass to the callback
338+
* @param callback the function to be called on each value of the variable
339+
* @param payload opaque pointer to pass to the callback
340340
*/
341341
GIT_EXTERN(int) git_config_get_multivar(const git_config *cfg, const char *name, const char *regexp, git_config_foreach_cb callback, void *payload);
342342

include/git2/diff.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ GIT_EXTERN(int) git_diff_print_raw(
747747
* letters for your own purposes. This function does just that. By the
748748
* way, unmodified will return a space (i.e. ' ').
749749
*
750-
* @param delta_t The git_delta_t value to look up
750+
* @param status The git_delta_t value to look up
751751
* @return The single character label for that code
752752
*/
753753
GIT_EXTERN(char) git_diff_status_char(git_delta_t status);
@@ -918,7 +918,7 @@ GIT_EXTERN(int) git_diff_patch_num_lines_in_hunk(
918918
* @param new_lineno Line number in new file or -1 if line is deleted
919919
* @param patch The patch to look in
920920
* @param hunk_idx The index of the hunk
921-
* @param line_of_index The index of the line in the hunk
921+
* @param line_of_hunk The index of the line in the hunk
922922
* @return 0 on success, <0 on failure
923923
*/
924924
GIT_EXTERN(int) git_diff_patch_get_line_in_hunk(
@@ -1017,7 +1017,7 @@ GIT_EXTERN(int) git_diff_blobs(
10171017
* @param old_as_path Treat old blob as if it had this filename; can be NULL
10181018
* @param new_blob Blob for new side of diff, or NULL for empty blob
10191019
* @param new_as_path Treat new blob as if it had this filename; can be NULL
1020-
* @param options Options for diff, or NULL for default options
1020+
* @param opts Options for diff, or NULL for default options
10211021
* @return 0 on success or error code < 0
10221022
*/
10231023
GIT_EXTERN(int) git_diff_patch_from_blobs(
@@ -1048,7 +1048,7 @@ GIT_EXTERN(int) git_diff_patch_from_blobs(
10481048
* @param options Options for diff, or NULL for default options
10491049
* @param file_cb Callback for "file"; made once if there is a diff; can be NULL
10501050
* @param hunk_cb Callback for each hunk in diff; can be NULL
1051-
* @param line_cb Callback for each line in diff; can be NULL
1051+
* @param data_cb Callback for each line in diff; can be NULL
10521052
* @param payload Payload passed to each callback function
10531053
* @return 0 on success, GIT_EUSER on non-zero callback return, or error code
10541054
*/
@@ -1078,7 +1078,7 @@ GIT_EXTERN(int) git_diff_blob_to_buffer(
10781078
* @param buffer Raw data for new side of diff, or NULL for empty
10791079
* @param buffer_len Length of raw data for new side of diff
10801080
* @param buffer_as_path Treat buffer as if it had this filename; can be NULL
1081-
* @param options Options for diff, or NULL for default options
1081+
* @param opts Options for diff, or NULL for default options
10821082
* @return 0 on success or error code < 0
10831083
*/
10841084
GIT_EXTERN(int) git_diff_patch_from_blob_and_buffer(

include/git2/errors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ GIT_EXTERN(void) giterr_clear(void);
100100
*
101101
* @param error_class One of the `git_error_t` enum above describing the
102102
* general subsystem that is responsible for the error.
103-
* @param message The formatted error message to keep
103+
* @param string The formatted error message to keep
104104
*/
105105
GIT_EXTERN(void) giterr_set_str(int error_class, const char *string);
106106

include/git2/index.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -646,7 +646,7 @@ GIT_EXTERN(int) git_index_conflict_next(
646646
/**
647647
* Frees a `git_index_conflict_iterator`.
648648
*
649-
* @param it pointer to the iterator
649+
* @param iterator pointer to the iterator
650650
*/
651651
GIT_EXTERN(void) git_index_conflict_iterator_free(
652652
git_index_conflict_iterator *iterator);

include/git2/indexer.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ typedef struct git_indexer_stream git_indexer_stream;
2121
* @param out where to store the indexer instance
2222
* @param path to the directory where the packfile should be stored
2323
* @param progress_cb function to call with progress information
24-
* @param progress_payload payload for the progress callback
24+
* @param progress_cb_payload payload for the progress callback
2525
*/
2626
GIT_EXTERN(int) git_indexer_stream_new(
2727
git_indexer_stream **out,

include/git2/merge.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ GIT_EXTERN(int) git_merge_head_from_oid(
141141
/**
142142
* Frees a `git_merge_head`
143143
*
144-
* @param the merge head to free
144+
* @param head merge head to free
145145
*/
146146
GIT_EXTERN(void) git_merge_head_free(
147147
git_merge_head *head);

include/git2/oid.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ GIT_EXTERN(void) git_oid_fromraw(git_oid *out, const unsigned char *raw);
8585
* needed for an oid encoded in hex (40 bytes). Only the
8686
* oid digits are written; a '\\0' terminator must be added
8787
* by the caller if it is required.
88-
* @param oid oid structure to format.
88+
* @param id oid structure to format.
8989
*/
9090
GIT_EXTERN(void) git_oid_fmt(char *out, const git_oid *id);
9191

@@ -96,7 +96,7 @@ GIT_EXTERN(void) git_oid_fmt(char *out, const git_oid *id);
9696
* If the number of bytes is > GIT_OID_HEXSZ, extra bytes
9797
* will be zeroed; if not, a '\0' terminator is NOT added.
9898
* @param n number of characters to write into out string
99-
* @param oid oid structure to format.
99+
* @param id oid structure to format.
100100
*/
101101
GIT_EXTERN(void) git_oid_nfmt(char *out, size_t n, const git_oid *id);
102102

@@ -118,7 +118,7 @@ GIT_EXTERN(void) git_oid_pathfmt(char *out, const git_oid *id);
118118
/**
119119
* Format a git_oid into a newly allocated c-string.
120120
*
121-
* @param oid the oid structure to format
121+
* @param id the oid structure to format
122122
* @return the c-string; NULL if memory is exhausted. Caller must
123123
* deallocate the string with git__free().
124124
*/

include/git2/pack.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ GIT_EXTERN(int) git_packbuilder_insert_commit(git_packbuilder *pb, const git_oid
112112
* @param pb The packbuilder
113113
* @param path to the directory where the packfile and index should be stored
114114
* @param progress_cb function to call with progress information from the indexer (optional)
115-
* @param progress_payload payload for the progress callback (optional)
115+
* @param progress_cb_payload payload for the progress callback (optional)
116116
*
117117
* @return 0 or an error code
118118
*/

include/git2/refs.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ GIT_EXTERN(int) git_reference_name_to_id(
6262
*
6363
* @param out pointer in which to store the reference
6464
* @param repo the repository in which to look
65-
* @param shrothand the short name for the reference
65+
* @param shorthand the short name for the reference
6666
* @return 0 or an error code
6767
*/
6868
GIT_EXTERN(int) git_reference_dwim(git_reference **out, git_repository *repo, const char *shorthand);
@@ -198,7 +198,7 @@ GIT_EXTERN(const char *) git_reference_name(const git_reference *ref);
198198
* If a direct reference is passed as an argument, a copy of that
199199
* reference is returned. This copy must be manually freed too.
200200
*
201-
* @param resolved_ref Pointer to the peeled reference
201+
* @param out Pointer to the peeled reference
202202
* @param ref The reference
203203
* @return 0 or an error code
204204
*/
@@ -266,7 +266,7 @@ GIT_EXTERN(int) git_reference_set_target(
266266
* the reflog if it exists.
267267
*
268268
* @param ref The reference to rename
269-
* @param name The new name for the reference
269+
* @param new_name The new name for the reference
270270
* @param force Overwrite an existing reference
271271
* @return 0 on success, EINVALIDSPEC, EEXISTS or an error code
272272
*
@@ -375,7 +375,7 @@ GIT_EXTERN(int) git_reference_iterator_glob_new(
375375
*
376376
* @param out pointer in which to store the reference
377377
* @param iter the iterator
378-
* @param 0, GIT_ITEROVER if there are no more; or an error code
378+
* @return 0, GIT_ITEROVER if there are no more; or an error code
379379
*/
380380
GIT_EXTERN(int) git_reference_next(git_reference **out, git_reference_iterator *iter);
381381

@@ -506,9 +506,9 @@ GIT_EXTERN(int) git_reference_normalize_name(
506506
* If you pass `GIT_OBJ_ANY` as the target type, then the object
507507
* will be peeled until a non-tag object is met.
508508
*
509-
* @param peeled Pointer to the peeled git_object
509+
* @param out Pointer to the peeled git_object
510510
* @param ref The reference to be processed
511-
* @param target_type The type of the requested object (GIT_OBJ_COMMIT,
511+
* @param type The type of the requested object (GIT_OBJ_COMMIT,
512512
* GIT_OBJ_TAG, GIT_OBJ_TREE, GIT_OBJ_BLOB or GIT_OBJ_ANY).
513513
* @return 0 on success, GIT_EAMBIGUOUS, GIT_ENOTFOUND or an error code
514514
*/

include/git2/refspec.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ GIT_EXTERN(int) git_refspec_force(const git_refspec *refspec);
5555
/**
5656
* Get the refspec's direction.
5757
*
58-
* @param the refspec
58+
* @param spec refspec
5959
* @return GIT_DIRECTION_FETCH or GIT_DIRECTION_PUSH
6060
*/
6161
GIT_EXTERN(git_direction) git_refspec_direction(const git_refspec *spec);

include/git2/remote.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ GIT_EXTERN(int) git_remote_ls(git_remote *remote, git_headlist_cb list_cb, void
259259
* @param progress_cb function to call with progress information. Be aware that
260260
* this is called inline with network and indexing operations, so performance
261261
* may be affected.
262-
* @param progress_payload payload for the progress callback
262+
* @param payload payload for the progress callback
263263
* @return 0 or an error code
264264
*/
265265
GIT_EXTERN(int) git_remote_download(
@@ -320,7 +320,7 @@ GIT_EXTERN(int) git_remote_update_tips(git_remote *remote);
320320
* Return whether a string is a valid remote URL
321321
*
322322
* @param url the url to check
323-
* @param 1 if the url is valid, 0 otherwise
323+
* @return 1 if the url is valid, 0 otherwise
324324
*/
325325
GIT_EXTERN(int) git_remote_valid_url(const char *url);
326326

include/git2/repository.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ typedef int (*git_repository_mergehead_foreach_cb)(const git_oid *oid,
519519
*
520520
* @param repo A repository object
521521
* @param callback Callback function
522-
* @param apyload Pointer to callback data (optional)
522+
* @param payload Pointer to callback data (optional)
523523
* @return 0 on success, GIT_ENOTFOUND, GIT_EUSER or error
524524
*/
525525
GIT_EXTERN(int) git_repository_mergehead_foreach(git_repository *repo,

include/git2/stash.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ typedef int (*git_stash_cb)(
8989
*
9090
* @param repo Repository where to find the stash.
9191
*
92-
* @param callabck Callback to invoke per found stashed state. The most recent
92+
* @param callback Callback to invoke per found stashed state. The most recent
9393
* stash state will be enumerated first.
9494
*
9595
* @param payload Extra parameter to callback function.

include/git2/submodule.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ GIT_EXTERN(int) git_submodule_sync(git_submodule *submodule);
481481
* function will return distinct `git_repository` objects. This will only
482482
* work if the submodule is checked out into the working directory.
483483
*
484-
* @param subrepo Pointer to the submodule repo which was opened
484+
* @param repo Pointer to the submodule repo which was opened
485485
* @param submodule Submodule to be opened
486486
* @return 0 on success, <0 if submodule repo could not be opened.
487487
*/
@@ -531,7 +531,7 @@ GIT_EXTERN(int) git_submodule_status(
531531
* This can be useful if you want to know if the submodule is present in the
532532
* working directory at this point in time, etc.
533533
*
534-
* @param status Combination of first four `GIT_SUBMODULE_STATUS` flags
534+
* @param location_status Combination of first four `GIT_SUBMODULE_STATUS` flags
535535
* @param submodule Submodule for which to get status
536536
* @return 0 on success, <0 on error
537537
*/

include/git2/tree.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ GIT_EXTERN(int) git_tree_lookup(
3838
*
3939
* @see git_object_lookup_prefix
4040
*
41-
* @param tree pointer to the looked up tree
41+
* @param out pointer to the looked up tree
4242
* @param repo the repo to use when locating the tree.
4343
* @param id identity of the tree to locate.
4444
* @param len the length of the short identifier
@@ -136,7 +136,7 @@ GIT_EXTERN(const git_tree_entry *) git_tree_entry_byoid(
136136
*
137137
* @param out Pointer where to store the tree entry
138138
* @param root Previously loaded tree which is the root of the relative path
139-
* @param subtree_path Path to the contained entry
139+
* @param path Path to the contained entry
140140
* @return 0 on success; GIT_ENOTFOUND if the path does not exist
141141
*/
142142
GIT_EXTERN(int) git_tree_entry_bypath(
@@ -212,7 +212,7 @@ GIT_EXTERN(int) git_tree_entry_cmp(const git_tree_entry *e1, const git_tree_entr
212212
*
213213
* You must call `git_object_free()` on the object when you are done with it.
214214
*
215-
* @param object pointer to the converted object
215+
* @param object_out pointer to the converted object
216216
* @param repo repository where to lookup the pointed object
217217
* @param entry a tree entry
218218
* @return 0 or an error code
@@ -251,7 +251,7 @@ GIT_EXTERN(void) git_treebuilder_clear(git_treebuilder *bld);
251251
/**
252252
* Get the number of entries listed in a treebuilder
253253
*
254-
* @param tree a previously loaded treebuilder.
254+
* @param bld a previously loaded treebuilder.
255255
* @return the number of entries in the treebuilder
256256
*/
257257
GIT_EXTERN(unsigned int) git_treebuilder_entrycount(git_treebuilder *bld);

0 commit comments

Comments
 (0)