Skip to content

Commit 2b6594d

Browse files
authored
Merge pull request libgit2#5111 from tiennou/fix/docs
Documentation fixes
2 parents f0a720d + 764196f commit 2b6594d

File tree

11 files changed

+71
-2
lines changed

11 files changed

+71
-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/odb.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include "types.h"
1212
#include "oid.h"
1313
#include "oidarray.h"
14+
#include "indexer.h"
1415

1516
/**
1617
* @file git2/odb.h

include/git2/odb_backend.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "common.h"
1111
#include "types.h"
12+
#include "indexer.h"
1213

1314
/**
1415
* @file git2/backend.h

include/git2/pack.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
#include "common.h"
1111
#include "oid.h"
12+
#include "indexer.h"
1213

1314
/**
1415
* @file git2/pack.h
@@ -178,6 +179,16 @@ GIT_EXTERN(int) git_packbuilder_write(
178179
*/
179180
GIT_EXTERN(const git_oid *) git_packbuilder_hash(git_packbuilder *pb);
180181

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+
*/
181192
typedef int GIT_CALLBACK(git_packbuilder_foreach_cb)(void *buf, size_t size, void *payload);
182193

183194
/**

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

0 commit comments

Comments
 (0)