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

Skip to content

Commit 11e2665

Browse files
committed
Formatting fixes for the docs
These are some issues I found while playing around with the new parser for docurium.
1 parent 2f6f6eb commit 11e2665

File tree

5 files changed

+58
-58
lines changed

5 files changed

+58
-58
lines changed

include/git2/checkout.h

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -43,17 +43,17 @@ GIT_BEGIN_DECL
4343
* In between those are `GIT_CHECKOUT_SAFE` and `GIT_CHECKOUT_SAFE_CREATE`
4444
* both of which only make modifications that will not lose changes.
4545
*
46-
* | target == baseline | target != baseline |
47-
* ---------------------|-----------------------|----------------------|
48-
* workdir == baseline | no action | create, update, or |
49-
* | | delete file |
50-
* ---------------------|-----------------------|----------------------|
51-
* workdir exists and | no action | conflict (notify |
52-
* is != baseline | notify dirty MODIFIED | and cancel checkout) |
53-
* ---------------------|-----------------------|----------------------|
54-
* workdir missing, | create if SAFE_CREATE | create file |
55-
* baseline present | notify dirty DELETED | |
56-
* ---------------------|-----------------------|----------------------|
46+
* | target == baseline | target != baseline |
47+
* ---------------------|-----------------------|----------------------|
48+
* workdir == baseline | no action | create, update, or |
49+
* | | delete file |
50+
* ---------------------|-----------------------|----------------------|
51+
* workdir exists and | no action | conflict (notify |
52+
* is != baseline | notify dirty MODIFIED | and cancel checkout) |
53+
* ---------------------|-----------------------|----------------------|
54+
* workdir missing, | create if SAFE_CREATE | create file |
55+
* baseline present | notify dirty DELETED | |
56+
* ---------------------|-----------------------|----------------------|
5757
*
5858
* The only difference between SAFE and SAFE_CREATE is that SAFE_CREATE
5959
* will cause a file to be checked out if it is missing from the working
@@ -106,7 +106,7 @@ GIT_BEGIN_DECL
106106
* target contains that file.
107107
*/
108108
typedef enum {
109-
GIT_CHECKOUT_NONE = 0, /** default is a dry run, no actual updates */
109+
GIT_CHECKOUT_NONE = 0, /**< default is a dry run, no actual updates */
110110

111111
/** Allow safe updates that cannot overwrite uncommitted data */
112112
GIT_CHECKOUT_SAFE = (1u << 0),

include/git2/diff.h

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -212,9 +212,9 @@ typedef struct git_diff git_diff;
212212
* considered reserved for internal or future use.
213213
*/
214214
typedef enum {
215-
GIT_DIFF_FLAG_BINARY = (1u << 0), /** file(s) treated as binary data */
216-
GIT_DIFF_FLAG_NOT_BINARY = (1u << 1), /** file(s) treated as text data */
217-
GIT_DIFF_FLAG_VALID_ID = (1u << 2), /** `id` value is known correct */
215+
GIT_DIFF_FLAG_BINARY = (1u << 0), /**< file(s) treated as binary data */
216+
GIT_DIFF_FLAG_NOT_BINARY = (1u << 1), /**< file(s) treated as text data */
217+
GIT_DIFF_FLAG_VALID_ID = (1u << 2), /**< `id` value is known correct */
218218
} git_diff_flag_t;
219219

220220
/**
@@ -228,15 +228,15 @@ typedef enum {
228228
* DELETED pairs).
229229
*/
230230
typedef enum {
231-
GIT_DELTA_UNMODIFIED = 0, /** no changes */
232-
GIT_DELTA_ADDED = 1, /** entry does not exist in old version */
233-
GIT_DELTA_DELETED = 2, /** entry does not exist in new version */
234-
GIT_DELTA_MODIFIED = 3, /** entry content changed between old and new */
235-
GIT_DELTA_RENAMED = 4, /** entry was renamed between old and new */
236-
GIT_DELTA_COPIED = 5, /** entry was copied from another old entry */
237-
GIT_DELTA_IGNORED = 6, /** entry is ignored item in workdir */
238-
GIT_DELTA_UNTRACKED = 7, /** entry is untracked item in workdir */
239-
GIT_DELTA_TYPECHANGE = 8, /** type of entry changed between old and new */
231+
GIT_DELTA_UNMODIFIED = 0, /**< no changes */
232+
GIT_DELTA_ADDED = 1, /**< entry does not exist in old version */
233+
GIT_DELTA_DELETED = 2, /**< entry does not exist in new version */
234+
GIT_DELTA_MODIFIED = 3, /**< entry content changed between old and new */
235+
GIT_DELTA_RENAMED = 4, /**< entry was renamed between old and new */
236+
GIT_DELTA_COPIED = 5, /**< entry was copied from another old entry */
237+
GIT_DELTA_IGNORED = 6, /**< entry is ignored item in workdir */
238+
GIT_DELTA_UNTRACKED = 7, /**< entry is untracked item in workdir */
239+
GIT_DELTA_TYPECHANGE = 8, /**< type of entry changed between old and new */
240240
} git_delta_t;
241241

242242
/**
@@ -416,12 +416,12 @@ typedef int (*git_diff_file_cb)(
416416
*/
417417
typedef struct git_diff_hunk git_diff_hunk;
418418
struct git_diff_hunk {
419-
int old_start; /** Starting line number in old_file */
420-
int old_lines; /** Number of lines in old_file */
421-
int new_start; /** Starting line number in new_file */
422-
int new_lines; /** Number of lines in new_file */
423-
size_t header_len; /** Number of bytes in header text */
424-
char header[128]; /** Header text, NUL-byte terminated */
419+
int old_start; /**< Starting line number in old_file */
420+
int old_lines; /**< Number of lines in old_file */
421+
int new_start; /**< Starting line number in new_file */
422+
int new_lines; /**< Number of lines in new_file */
423+
size_t header_len; /**< Number of bytes in header text */
424+
char header[128]; /**< Header text, NUL-byte terminated */
425425
};
426426

427427
/**
@@ -464,13 +464,13 @@ typedef enum {
464464
*/
465465
typedef struct git_diff_line git_diff_line;
466466
struct git_diff_line {
467-
char origin; /** A git_diff_line_t value */
468-
int old_lineno; /** Line number in old file or -1 for added line */
469-
int new_lineno; /** Line number in new file or -1 for deleted line */
470-
int num_lines; /** Number of newline characters in content */
471-
size_t content_len; /** Number of bytes of data */
472-
git_off_t content_offset; /** Offset in the original file to the content */
473-
const char *content; /** Pointer to diff text, not NUL-byte terminated */
467+
char origin; /**< A git_diff_line_t value */
468+
int old_lineno; /**< Line number in old file or -1 for added line */
469+
int new_lineno; /**< Line number in new file or -1 for deleted line */
470+
int num_lines; /**< Number of newline characters in content */
471+
size_t content_len; /**< Number of bytes of data */
472+
git_off_t content_offset; /**< Offset in the original file to the content */
473+
const char *content; /**< Pointer to diff text, not NUL-byte terminated */
474474
};
475475

476476
/**
@@ -482,10 +482,10 @@ struct git_diff_line {
482482
* of lines of file and hunk headers.
483483
*/
484484
typedef int (*git_diff_line_cb)(
485-
const git_diff_delta *delta, /** delta that contains this data */
486-
const git_diff_hunk *hunk, /** hunk containing this data */
487-
const git_diff_line *line, /** line data */
488-
void *payload); /** user reference data */
485+
const git_diff_delta *delta, /**< delta that contains this data */
486+
const git_diff_hunk *hunk, /**< hunk containing this data */
487+
const git_diff_line *line, /**< line data */
488+
void *payload); /**< user reference data */
489489

490490
/**
491491
* Flags to control the behavior of diff rename/copy detection.

include/git2/index.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ GIT_EXTERN(int) git_index_add(git_index *index, const git_index_entry *source_en
415415
* (entry->flags & GIT_IDXENTRY_STAGEMASK) >> GIT_IDXENTRY_STAGESHIFT
416416
*
417417
* @param entry The entry
418-
* @returns the stage number
418+
* @return the stage number
419419
*/
420420
GIT_EXTERN(int) git_index_entry_stage(const git_index_entry *entry);
421421

include/git2/reset.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ GIT_BEGIN_DECL
1919
* Kinds of reset operation
2020
*/
2121
typedef enum {
22-
GIT_RESET_SOFT = 1, /** Move the head to the given commit */
23-
GIT_RESET_MIXED = 2, /** SOFT plus reset index to the commit */
24-
GIT_RESET_HARD = 3, /** MIXED plus changes in working tree discarded */
22+
GIT_RESET_SOFT = 1, /**< Move the head to the given commit */
23+
GIT_RESET_MIXED = 2, /**< SOFT plus reset index to the commit */
24+
GIT_RESET_HARD = 3, /**< MIXED plus changes in working tree discarded */
2525
} git_reset_t;
2626

2727
/**

include/git2/types.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -154,15 +154,15 @@ typedef struct git_packbuilder git_packbuilder;
154154

155155
/** Time in a signature */
156156
typedef struct git_time {
157-
git_time_t time; /** time in seconds from epoch */
158-
int offset; /** timezone offset, in minutes */
157+
git_time_t time; /**< time in seconds from epoch */
158+
int offset; /**< timezone offset, in minutes */
159159
} git_time;
160160

161161
/** An action signature (e.g. for committers, taggers, etc) */
162162
typedef struct git_signature {
163-
char *name; /** full name of the author */
164-
char *email; /** email of the author */
165-
git_time when; /** time when the action happened */
163+
char *name; /**< full name of the author */
164+
char *email; /**< email of the author */
165+
git_time when; /**< time when the action happened */
166166
} git_signature;
167167

168168
/** In-memory representation of a reference. */
@@ -183,9 +183,9 @@ typedef struct git_status_list git_status_list;
183183

184184
/** Basic type of any Git reference. */
185185
typedef enum {
186-
GIT_REF_INVALID = 0, /** Invalid reference */
187-
GIT_REF_OID = 1, /** A reference which points at an object id */
188-
GIT_REF_SYMBOLIC = 2, /** A reference which points at another reference */
186+
GIT_REF_INVALID = 0, /**< Invalid reference */
187+
GIT_REF_OID = 1, /**< A reference which points at an object id */
188+
GIT_REF_SYMBOLIC = 2, /**< A reference which points at another reference */
189189
GIT_REF_LISTALL = GIT_REF_OID|GIT_REF_SYMBOLIC,
190190
} git_ref_t;
191191

@@ -314,12 +314,12 @@ typedef enum {
314314
* when we don't want any particular ignore rule to be specified.
315315
*/
316316
typedef enum {
317-
GIT_SUBMODULE_IGNORE_RESET = -1, /* reset to on-disk value */
317+
GIT_SUBMODULE_IGNORE_RESET = -1, /**< reset to on-disk value */
318318

319-
GIT_SUBMODULE_IGNORE_NONE = 1, /* any change or untracked == dirty */
320-
GIT_SUBMODULE_IGNORE_UNTRACKED = 2, /* dirty if tracked files change */
321-
GIT_SUBMODULE_IGNORE_DIRTY = 3, /* only dirty if HEAD moved */
322-
GIT_SUBMODULE_IGNORE_ALL = 4, /* never dirty */
319+
GIT_SUBMODULE_IGNORE_NONE = 1, /**< any change or untracked == dirty */
320+
GIT_SUBMODULE_IGNORE_UNTRACKED = 2, /**< dirty if tracked files change */
321+
GIT_SUBMODULE_IGNORE_DIRTY = 3, /**< only dirty if HEAD moved */
322+
GIT_SUBMODULE_IGNORE_ALL = 4, /**< never dirty */
323323

324324
GIT_SUBMODULE_IGNORE_DEFAULT = 0
325325
} git_submodule_ignore_t;

0 commit comments

Comments
 (0)