Skip to content

Commit 764196f

Browse files
committed
doc: add missing documentation comments
1 parent 2376fa6 commit 764196f

File tree

9 files changed

+68
-2
lines changed

9 files changed

+68
-2
lines changed

include/git2/apply.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ GIT_EXTERN(int) git_apply_to_tree(
9191
git_diff *diff,
9292
const git_apply_options *options);
9393

94+
/** Possible application locations for git_apply */
9495
typedef enum {
9596
/**
9697
* Apply the patch to the workdir, leaving the index untouched.

include/git2/checkout.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ typedef enum {
225225
GIT_CHECKOUT_NOTIFY_ALL = 0x0FFFFu
226226
} git_checkout_notify_t;
227227

228+
/** Checkout performance-reporting structure */
228229
typedef struct {
229230
size_t mkdir_calls;
230231
size_t stat_calls;

include/git2/index.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ typedef enum {
143143
GIT_INDEX_ADD_CHECK_PATHSPEC = (1u << 2),
144144
} git_index_add_option_t;
145145

146+
/** Git index stage states */
146147
typedef enum {
147148
/**
148149
* Match any index stage.

include/git2/indexer.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
GIT_BEGIN_DECL
1515

16+
/** A git indexer object */
1617
typedef struct git_indexer git_indexer;
1718

1819
/**
@@ -55,7 +56,9 @@ typedef struct git_indexer_progress {
5556
*/
5657
typedef int GIT_CALLBACK(git_indexer_progress_cb)(const git_indexer_progress *stats, void *payload);
5758

58-
59+
/**
60+
* Options for indexer configuration
61+
*/
5962
typedef struct git_indexer_options {
6063
unsigned int version;
6164

include/git2/pack.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,16 @@ GIT_EXTERN(int) git_packbuilder_write(
179179
*/
180180
GIT_EXTERN(const git_oid *) git_packbuilder_hash(git_packbuilder *pb);
181181

182+
/**
183+
* Callback used to iterate over packed objects
184+
*
185+
* @see git_packbuilder_foreach
186+
*
187+
* @param buf A pointer to the object's data
188+
* @param size The size of the underlying object
189+
* @param payload Payload passed to git_packbuilder_foreach
190+
* @return non-zero to terminate the iteration
191+
*/
182192
typedef int GIT_CALLBACK(git_packbuilder_foreach_cb)(void *buf, size_t size, void *payload);
183193

184194
/**

include/git2/refs.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,26 @@ GIT_EXTERN(int) git_reference_remove(git_repository *repo, const char *name);
422422
*/
423423
GIT_EXTERN(int) git_reference_list(git_strarray *array, git_repository *repo);
424424

425+
/**
426+
* Callback used to iterate over references
427+
*
428+
* @see git_reference_foreach
429+
*
430+
* @param reference The reference object
431+
* @param payload Payload passed to git_reference_foreach
432+
* @return non-zero to terminate the iteration
433+
*/
425434
typedef int GIT_CALLBACK(git_reference_foreach_cb)(git_reference *reference, void *payload);
435+
436+
/**
437+
* Callback used to iterate over reference names
438+
*
439+
* @see git_reference_foreach_name
440+
*
441+
* @param name The reference name
442+
* @param payload Payload passed to git_reference_foreach_name
443+
* @return non-zero to terminate the iteration
444+
*/
426445
typedef int GIT_CALLBACK(git_reference_foreach_name_cb)(const char *name, void *payload);
427446

428447
/**

include/git2/remote.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -599,6 +599,7 @@ GIT_EXTERN(int) git_remote_init_callbacks(
599599
git_remote_callbacks *opts,
600600
unsigned int version);
601601

602+
/** Acceptable prune settings when fetching */
602603
typedef enum {
603604
/**
604605
* Use the setting from the configuration

include/git2/repository.h

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -640,6 +640,18 @@ GIT_EXTERN(int) git_repository_message_remove(git_repository *repo);
640640
*/
641641
GIT_EXTERN(int) git_repository_state_cleanup(git_repository *repo);
642642

643+
/**
644+
* Callback used to iterate over each FETCH_HEAD entry
645+
*
646+
* @see git_repository_fetchhead_foreach
647+
*
648+
* @param ref_name The reference name
649+
* @param remote_url The remote URL
650+
* @param oid The reference target OID
651+
* @param is_merge Was the reference the result of a merge
652+
* @param payload Payload passed to git_repository_fetchhead_foreach
653+
* @return non-zero to terminate the iteration
654+
*/
643655
typedef int GIT_CALLBACK(git_repository_fetchhead_foreach_cb)(const char *ref_name,
644656
const char *remote_url,
645657
const git_oid *oid,
@@ -662,6 +674,15 @@ GIT_EXTERN(int) git_repository_fetchhead_foreach(
662674
git_repository_fetchhead_foreach_cb callback,
663675
void *payload);
664676

677+
/**
678+
* Callback used to iterate over each MERGE_HEAD entry
679+
*
680+
* @see git_repository_mergehead_foreach
681+
*
682+
* @param oid The merge OID
683+
* @param payload Payload passed to git_repository_mergehead_foreach
684+
* @return non-zero to terminate the iteration
685+
*/
665686
typedef int GIT_CALLBACK(git_repository_mergehead_foreach_cb)(const git_oid *oid,
666687
void *payload);
667688

include/git2/tag.h

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,16 @@ GIT_EXTERN(int) git_tag_list_match(
317317
const char *pattern,
318318
git_repository *repo);
319319

320-
320+
/**
321+
* Callback used to iterate over tag names
322+
*
323+
* @see git_tag_foreach
324+
*
325+
* @param name The tag name
326+
* @param oid The tag's OID
327+
* @param payload Payload passed to git_tag_foreach
328+
* @return non-zero to terminate the iteration
329+
*/
321330
typedef int GIT_CALLBACK(git_tag_foreach_cb)(const char *name, git_oid *oid, void *payload);
322331

323332
/**

0 commit comments

Comments
 (0)