Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
3e5239e4
Unverified
Commit
3e5239e4
authored
Jan 16, 2018
by
Brian Lopez
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update code docs
parent
1e758fd3
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
include/git2/message.h
+15
-4
No files found.
include/git2/message.h
View file @
3e5239e4
...
@@ -38,11 +38,20 @@ GIT_BEGIN_DECL
...
@@ -38,11 +38,20 @@ GIT_BEGIN_DECL
*/
*/
GIT_EXTERN
(
int
)
git_message_prettify
(
git_buf
*
out
,
const
char
*
message
,
int
strip_comments
,
char
comment_char
);
GIT_EXTERN
(
int
)
git_message_prettify
(
git_buf
*
out
,
const
char
*
message
,
int
strip_comments
,
char
comment_char
);
/**
* Represents a single git message trailer.
*/
typedef
struct
{
typedef
struct
{
const
char
*
key
;
const
char
*
key
;
const
char
*
value
;
const
char
*
value
;
}
git_message_trailer
;
}
git_message_trailer
;
/**
* Represents an array of git message trailers.
*
* Struct members under the private comment are private, subject to change
* and should not be used by callers.
*/
typedef
struct
{
typedef
struct
{
git_message_trailer
*
trailers
;
git_message_trailer
*
trailers
;
size_t
count
;
size_t
count
;
...
@@ -52,9 +61,7 @@ typedef struct {
...
@@ -52,9 +61,7 @@ typedef struct {
}
git_message_trailer_array
;
}
git_message_trailer_array
;
/**
/**
* Parse trailers out of a message, calling a callback once for each trailer.
* Parse trailers out of a message, filling the array pointed to by +arr+.
*
* Return non-zero from the callback to stop processing.
*
*
* Trailers are key/value pairs in the last paragraph of a message, not
* Trailers are key/value pairs in the last paragraph of a message, not
* including any patches or conflicts that may be present.
* including any patches or conflicts that may be present.
...
@@ -62,10 +69,14 @@ typedef struct {
...
@@ -62,10 +69,14 @@ typedef struct {
* @param arr A pre-allocated git_message_trailer_array struct to be filled in
* @param arr A pre-allocated git_message_trailer_array struct to be filled in
* with any trailers found during parsing.
* with any trailers found during parsing.
* @param message The message to be parsed
* @param message The message to be parsed
* @return 0 on success, or non-zero
callback return value
.
* @return 0 on success, or non-zero
on error
.
*/
*/
GIT_EXTERN
(
int
)
git_message_trailers
(
git_message_trailer_array
*
arr
,
const
char
*
message
);
GIT_EXTERN
(
int
)
git_message_trailers
(
git_message_trailer_array
*
arr
,
const
char
*
message
);
/**
* Clean's up any allocated memory in the git_message_trailer_array filled by
* a call to git_message_trailers.
*/
GIT_EXTERN
(
void
)
git_message_trailer_array_free
(
git_message_trailer_array
*
arr
);
GIT_EXTERN
(
void
)
git_message_trailer_array_free
(
git_message_trailer_array
*
arr
);
/** @} */
/** @} */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment