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
258df9c1
Unverified
Commit
258df9c1
authored
Jan 17, 2022
by
Edward Thomson
Committed by
GitHub
Jan 17, 2022
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #6168 from punkymaniac/patch-documentation-2
Improve documentation
parents
d298059e
d4232e7c
Show whitespace changes
Inline
Side-by-side
Showing
32 changed files
with
144 additions
and
9 deletions
+144
-9
include/git2/apply.h
+14
-0
include/git2/attr.h
+9
-0
include/git2/blame.h
+3
-0
include/git2/blob.h
+1
-0
include/git2/branch.h
+2
-0
include/git2/commit.h
+2
-0
include/git2/common.h
+3
-0
include/git2/config.h
+18
-2
include/git2/credential.h
+1
-0
include/git2/credential_helpers.h
+1
-0
include/git2/describe.h
+5
-0
include/git2/diff.h
+7
-0
include/git2/filter.h
+5
-0
include/git2/graph.h
+1
-0
include/git2/ignore.h
+1
-1
include/git2/index.h
+3
-0
include/git2/indexer.h
+5
-0
include/git2/merge.h
+2
-0
include/git2/message.h
+2
-0
include/git2/object.h
+1
-0
include/git2/odb.h
+14
-6
include/git2/pack.h
+2
-0
include/git2/patch.h
+8
-0
include/git2/rebase.h
+8
-0
include/git2/refdb.h
+3
-0
include/git2/remote.h
+3
-0
include/git2/repository.h
+5
-0
include/git2/revwalk.h
+3
-0
include/git2/submodule.h
+5
-0
include/git2/tag.h
+1
-0
include/git2/tree.h
+1
-0
include/git2/worktree.h
+5
-0
No files found.
include/git2/apply.h
View file @
258df9c1
...
@@ -32,6 +32,8 @@ GIT_BEGIN_DECL
...
@@ -32,6 +32,8 @@ GIT_BEGIN_DECL
*
*
* @param delta The delta to be applied
* @param delta The delta to be applied
* @param payload User-specified payload
* @param payload User-specified payload
* @return 0 if the delta is applied, < 0 if the apply process will be aborted
* or > 0 if the delta will not be applied.
*/
*/
typedef
int
GIT_CALLBACK
(
git_apply_delta_cb
)(
typedef
int
GIT_CALLBACK
(
git_apply_delta_cb
)(
const
git_diff_delta
*
delta
,
const
git_diff_delta
*
delta
,
...
@@ -48,6 +50,8 @@ typedef int GIT_CALLBACK(git_apply_delta_cb)(
...
@@ -48,6 +50,8 @@ typedef int GIT_CALLBACK(git_apply_delta_cb)(
*
*
* @param hunk The hunk to be applied
* @param hunk The hunk to be applied
* @param payload User-specified payload
* @param payload User-specified payload
* @return 0 if the hunk is applied, < 0 if the apply process will be aborted
* or > 0 if the hunk will not be applied.
*/
*/
typedef
int
GIT_CALLBACK
(
git_apply_hunk_cb
)(
typedef
int
GIT_CALLBACK
(
git_apply_hunk_cb
)(
const
git_diff_hunk
*
hunk
,
const
git_diff_hunk
*
hunk
,
...
@@ -89,6 +93,16 @@ typedef struct {
...
@@ -89,6 +93,16 @@ typedef struct {
#define GIT_APPLY_OPTIONS_VERSION 1
#define GIT_APPLY_OPTIONS_VERSION 1
#define GIT_APPLY_OPTIONS_INIT {GIT_APPLY_OPTIONS_VERSION}
#define GIT_APPLY_OPTIONS_INIT {GIT_APPLY_OPTIONS_VERSION}
/**
* Initialize git_apply_options structure
*
* Initialize a `git_apply_options` with default values. Equivalent to creating
* an instance with GIT_APPLY_OPTIONS_INIT.
*
* @param opts The `git_apply_options` struct to initialize.
* @param version The struct version; pass `GIT_APPLY_OPTIONS_VERSION`
* @return 0 on success or -1 on failure.
*/
GIT_EXTERN
(
int
)
git_apply_options_init
(
git_apply_options
*
opts
,
unsigned
int
version
);
GIT_EXTERN
(
int
)
git_apply_options_init
(
git_apply_options
*
opts
,
unsigned
int
version
);
/**
/**
...
...
include/git2/attr.h
View file @
258df9c1
...
@@ -177,6 +177,7 @@ typedef struct {
...
@@ -177,6 +177,7 @@ typedef struct {
* not have to exist, but if it does not, then it will be
* not have to exist, but if it does not, then it will be
* treated as a plain file (not a directory).
* treated as a plain file (not a directory).
* @param name The name of the attribute to look up.
* @param name The name of the attribute to look up.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_attr_get
(
GIT_EXTERN
(
int
)
git_attr_get
(
const
char
**
value_out
,
const
char
**
value_out
,
...
@@ -199,6 +200,7 @@ GIT_EXTERN(int) git_attr_get(
...
@@ -199,6 +200,7 @@ GIT_EXTERN(int) git_attr_get(
* not have to exist, but if it does not, then it will be
* not have to exist, but if it does not, then it will be
* treated as a plain file (not a directory).
* treated as a plain file (not a directory).
* @param name The name of the attribute to look up.
* @param name The name of the attribute to look up.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_attr_get_ext
(
GIT_EXTERN
(
int
)
git_attr_get_ext
(
const
char
**
value_out
,
const
char
**
value_out
,
...
@@ -235,6 +237,7 @@ GIT_EXTERN(int) git_attr_get_ext(
...
@@ -235,6 +237,7 @@ GIT_EXTERN(int) git_attr_get_ext(
* it will be treated as a plain file (i.e. not a directory).
* it will be treated as a plain file (i.e. not a directory).
* @param num_attr The number of attributes being looked up
* @param num_attr The number of attributes being looked up
* @param names An array of num_attr strings containing attribute names.
* @param names An array of num_attr strings containing attribute names.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_attr_get_many
(
GIT_EXTERN
(
int
)
git_attr_get_many
(
const
char
**
values_out
,
const
char
**
values_out
,
...
@@ -259,6 +262,7 @@ GIT_EXTERN(int) git_attr_get_many(
...
@@ -259,6 +262,7 @@ GIT_EXTERN(int) git_attr_get_many(
* it will be treated as a plain file (i.e. not a directory).
* it will be treated as a plain file (i.e. not a directory).
* @param num_attr The number of attributes being looked up
* @param num_attr The number of attributes being looked up
* @param names An array of num_attr strings containing attribute names.
* @param names An array of num_attr strings containing attribute names.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_attr_get_many_ext
(
GIT_EXTERN
(
int
)
git_attr_get_many_ext
(
const
char
**
values_out
,
const
char
**
values_out
,
...
@@ -349,6 +353,11 @@ GIT_EXTERN(int) git_attr_cache_flush(
...
@@ -349,6 +353,11 @@ GIT_EXTERN(int) git_attr_cache_flush(
* macro, you would call:
* macro, you would call:
*
*
* git_attr_add_macro(repo, "binary", "-diff -crlf");
* git_attr_add_macro(repo, "binary", "-diff -crlf");
*
* @param repo The repository to add the macro in.
* @param name The name of the macro.
* @param values The value for the macro.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_attr_add_macro
(
GIT_EXTERN
(
int
)
git_attr_add_macro
(
git_repository
*
repo
,
git_repository
*
repo
,
...
...
include/git2/blame.h
View file @
258df9c1
...
@@ -203,6 +203,9 @@ typedef struct git_blame git_blame;
...
@@ -203,6 +203,9 @@ typedef struct git_blame git_blame;
/**
/**
* Gets the number of hunks that exist in the blame structure.
* Gets the number of hunks that exist in the blame structure.
*
* @param blame The blame structure to query.
* @return The number of hunks.
*/
*/
GIT_EXTERN
(
uint32_t
)
git_blame_get_hunk_count
(
git_blame
*
blame
);
GIT_EXTERN
(
uint32_t
)
git_blame_get_hunk_count
(
git_blame
*
blame
);
...
...
include/git2/blob.h
View file @
258df9c1
...
@@ -302,6 +302,7 @@ GIT_EXTERN(int) git_blob_data_is_binary(const char *data, size_t len);
...
@@ -302,6 +302,7 @@ GIT_EXTERN(int) git_blob_data_is_binary(const char *data, size_t len);
*
*
* @param out Pointer to store the copy of the object
* @param out Pointer to store the copy of the object
* @param source Original object to copy
* @param source Original object to copy
* @return 0.
*/
*/
GIT_EXTERN
(
int
)
git_blob_dup
(
git_blob
**
out
,
git_blob
*
source
);
GIT_EXTERN
(
int
)
git_blob_dup
(
git_blob
**
out
,
git_blob
*
source
);
...
...
include/git2/branch.h
View file @
258df9c1
...
@@ -34,6 +34,8 @@ GIT_BEGIN_DECL
...
@@ -34,6 +34,8 @@ GIT_BEGIN_DECL
*
*
* @param out Pointer where to store the underlying reference.
* @param out Pointer where to store the underlying reference.
*
*
* @param repo the repository to create the branch in.
*
* @param branch_name Name for the branch; this name is
* @param branch_name Name for the branch; this name is
* validated for consistency. It should also not conflict with
* validated for consistency. It should also not conflict with
* an already existing branch name.
* an already existing branch name.
...
...
include/git2/commit.h
View file @
258df9c1
...
@@ -479,6 +479,7 @@ GIT_EXTERN(int) git_commit_create_buffer(
...
@@ -479,6 +479,7 @@ GIT_EXTERN(int) git_commit_create_buffer(
* to the commit and write it into the given repository.
* to the commit and write it into the given repository.
*
*
* @param out the resulting commit id
* @param out the resulting commit id
* @param repo the repository to create the commit in.
* @param commit_content the content of the unsigned commit object
* @param commit_content the content of the unsigned commit object
* @param signature the signature to add to the commit. Leave `NULL`
* @param signature the signature to add to the commit. Leave `NULL`
* to create a commit without adding a signature field.
* to create a commit without adding a signature field.
...
@@ -499,6 +500,7 @@ GIT_EXTERN(int) git_commit_create_with_signature(
...
@@ -499,6 +500,7 @@ GIT_EXTERN(int) git_commit_create_with_signature(
*
*
* @param out Pointer to store the copy of the commit
* @param out Pointer to store the copy of the commit
* @param source Original commit to copy
* @param source Original commit to copy
* @return 0
*/
*/
GIT_EXTERN
(
int
)
git_commit_dup
(
git_commit
**
out
,
git_commit
*
source
);
GIT_EXTERN
(
int
)
git_commit_dup
(
git_commit
**
out
,
git_commit
*
source
);
...
...
include/git2/common.h
View file @
258df9c1
...
@@ -167,6 +167,9 @@ typedef enum {
...
@@ -167,6 +167,9 @@ typedef enum {
* - GIT_FEATURE_SSH
* - GIT_FEATURE_SSH
* Libgit2 supports the SSH protocol for network operations. This requires
* Libgit2 supports the SSH protocol for network operations. This requires
* the libssh2 library to be found when compiling libgit2
* the libssh2 library to be found when compiling libgit2
*
* - GIT_FEATURE_NSEC
* Libgit2 supports the sub-second resolution in file modification times.
*/
*/
GIT_EXTERN
(
int
)
git_libgit2_features
(
void
);
GIT_EXTERN
(
int
)
git_libgit2_features
(
void
);
...
...
include/git2/config.h
View file @
258df9c1
...
@@ -72,14 +72,17 @@ typedef struct git_config_entry {
...
@@ -72,14 +72,17 @@ typedef struct git_config_entry {
/**
/**
* Free a config entry
* Free a config entry
*
* @param entry The entry to free.
*/
*/
GIT_EXTERN
(
void
)
git_config_entry_free
(
git_config_entry
*
);
GIT_EXTERN
(
void
)
git_config_entry_free
(
git_config_entry
*
entry
);
/**
/**
* A config enumeration callback
* A config enumeration callback
*
*
* @param entry the entry currently being enumerated
* @param entry the entry currently being enumerated
* @param payload a user-specified pointer
* @param payload a user-specified pointer
* @return non-zero to terminate the iteration.
*/
*/
typedef
int
GIT_CALLBACK
(
git_config_foreach_cb
)(
const
git_config_entry
*
entry
,
void
*
payload
);
typedef
int
GIT_CALLBACK
(
git_config_foreach_cb
)(
const
git_config_entry
*
entry
,
void
*
payload
);
...
@@ -269,6 +272,7 @@ GIT_EXTERN(int) git_config_open_level(
...
@@ -269,6 +272,7 @@ GIT_EXTERN(int) git_config_open_level(
*
*
* @param out pointer in which to store the config object
* @param out pointer in which to store the config object
* @param config the config object in which to look
* @param config the config object in which to look
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_open_global
(
git_config
**
out
,
git_config
*
config
);
GIT_EXTERN
(
int
)
git_config_open_global
(
git_config
**
out
,
git_config
*
config
);
...
@@ -422,6 +426,7 @@ GIT_EXTERN(int) git_config_get_string_buf(git_buf *out, const git_config *cfg, c
...
@@ -422,6 +426,7 @@ GIT_EXTERN(int) git_config_get_string_buf(git_buf *out, const git_config *cfg, c
* interested in. Use NULL to indicate all
* interested in. Use NULL to indicate all
* @param callback the function to be called on each value of the variable
* @param callback the function to be called on each value of the variable
* @param payload opaque pointer to pass to the callback
* @param payload opaque pointer to pass to the callback
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_get_multivar_foreach
(
const
git_config
*
cfg
,
const
char
*
name
,
const
char
*
regexp
,
git_config_foreach_cb
callback
,
void
*
payload
);
GIT_EXTERN
(
int
)
git_config_get_multivar_foreach
(
const
git_config
*
cfg
,
const
char
*
name
,
const
char
*
regexp
,
git_config_foreach_cb
callback
,
void
*
payload
);
...
@@ -437,6 +442,7 @@ GIT_EXTERN(int) git_config_get_multivar_foreach(const git_config *cfg, const cha
...
@@ -437,6 +442,7 @@ GIT_EXTERN(int) git_config_get_multivar_foreach(const git_config *cfg, const cha
* @param name the variable's name
* @param name the variable's name
* @param regexp regular expression to filter which variables we're
* @param regexp regular expression to filter which variables we're
* interested in. Use NULL to indicate all
* interested in. Use NULL to indicate all
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_multivar_iterator_new
(
git_config_iterator
**
out
,
const
git_config
*
cfg
,
const
char
*
name
,
const
char
*
regexp
);
GIT_EXTERN
(
int
)
git_config_multivar_iterator_new
(
git_config_iterator
**
out
,
const
git_config
*
cfg
,
const
char
*
name
,
const
char
*
regexp
);
...
@@ -515,6 +521,7 @@ GIT_EXTERN(int) git_config_set_string(git_config *cfg, const char *name, const c
...
@@ -515,6 +521,7 @@ GIT_EXTERN(int) git_config_set_string(git_config *cfg, const char *name, const c
* @param name the variable's name
* @param name the variable's name
* @param regexp a regular expression to indicate which values to replace
* @param regexp a regular expression to indicate which values to replace
* @param value the new value.
* @param value the new value.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_set_multivar
(
git_config
*
cfg
,
const
char
*
name
,
const
char
*
regexp
,
const
char
*
value
);
GIT_EXTERN
(
int
)
git_config_set_multivar
(
git_config
*
cfg
,
const
char
*
name
,
const
char
*
regexp
,
const
char
*
value
);
...
@@ -524,6 +531,7 @@ GIT_EXTERN(int) git_config_set_multivar(git_config *cfg, const char *name, const
...
@@ -524,6 +531,7 @@ GIT_EXTERN(int) git_config_set_multivar(git_config *cfg, const char *name, const
*
*
* @param cfg the configuration
* @param cfg the configuration
* @param name the variable to delete
* @param name the variable to delete
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_delete_entry
(
git_config
*
cfg
,
const
char
*
name
);
GIT_EXTERN
(
int
)
git_config_delete_entry
(
git_config
*
cfg
,
const
char
*
name
);
...
@@ -568,7 +576,8 @@ GIT_EXTERN(int) git_config_foreach(
...
@@ -568,7 +576,8 @@ GIT_EXTERN(int) git_config_foreach(
* `git_config_iterator_free` when done.
* `git_config_iterator_free` when done.
*
*
* @param out pointer to store the iterator
* @param out pointer to store the iterator
* @param cfg where to ge the variables from
* @param cfg where to get the variables from
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_iterator_new
(
git_config_iterator
**
out
,
const
git_config
*
cfg
);
GIT_EXTERN
(
int
)
git_config_iterator_new
(
git_config_iterator
**
out
,
const
git_config
*
cfg
);
...
@@ -585,6 +594,7 @@ GIT_EXTERN(int) git_config_iterator_new(git_config_iterator **out, const git_con
...
@@ -585,6 +594,7 @@ GIT_EXTERN(int) git_config_iterator_new(git_config_iterator **out, const git_con
* @param out pointer to store the iterator
* @param out pointer to store the iterator
* @param cfg where to ge the variables from
* @param cfg where to ge the variables from
* @param regexp regular expression to match the names
* @param regexp regular expression to match the names
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_iterator_glob_new
(
git_config_iterator
**
out
,
const
git_config
*
cfg
,
const
char
*
regexp
);
GIT_EXTERN
(
int
)
git_config_iterator_glob_new
(
git_config_iterator
**
out
,
const
git_config
*
cfg
,
const
char
*
regexp
);
...
@@ -662,6 +672,7 @@ GIT_EXTERN(int) git_config_get_mapped(
...
@@ -662,6 +672,7 @@ GIT_EXTERN(int) git_config_get_mapped(
* @param maps array of `git_configmap` objects specifying the possible mappings
* @param maps array of `git_configmap` objects specifying the possible mappings
* @param map_n number of mapping objects in `maps`
* @param map_n number of mapping objects in `maps`
* @param value value to parse
* @param value value to parse
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_lookup_map_value
(
GIT_EXTERN
(
int
)
git_config_lookup_map_value
(
int
*
out
,
int
*
out
,
...
@@ -678,6 +689,7 @@ GIT_EXTERN(int) git_config_lookup_map_value(
...
@@ -678,6 +689,7 @@ GIT_EXTERN(int) git_config_lookup_map_value(
*
*
* @param out place to store the result of the parsing
* @param out place to store the result of the parsing
* @param value value to parse
* @param value value to parse
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_parse_bool
(
int
*
out
,
const
char
*
value
);
GIT_EXTERN
(
int
)
git_config_parse_bool
(
int
*
out
,
const
char
*
value
);
...
@@ -690,6 +702,7 @@ GIT_EXTERN(int) git_config_parse_bool(int *out, const char *value);
...
@@ -690,6 +702,7 @@ GIT_EXTERN(int) git_config_parse_bool(int *out, const char *value);
*
*
* @param out place to store the result of the parsing
* @param out place to store the result of the parsing
* @param value value to parse
* @param value value to parse
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_parse_int32
(
int32_t
*
out
,
const
char
*
value
);
GIT_EXTERN
(
int
)
git_config_parse_int32
(
int32_t
*
out
,
const
char
*
value
);
...
@@ -702,6 +715,7 @@ GIT_EXTERN(int) git_config_parse_int32(int32_t *out, const char *value);
...
@@ -702,6 +715,7 @@ GIT_EXTERN(int) git_config_parse_int32(int32_t *out, const char *value);
*
*
* @param out place to store the result of the parsing
* @param out place to store the result of the parsing
* @param value value to parse
* @param value value to parse
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_parse_int64
(
int64_t
*
out
,
const
char
*
value
);
GIT_EXTERN
(
int
)
git_config_parse_int64
(
int64_t
*
out
,
const
char
*
value
);
...
@@ -717,6 +731,7 @@ GIT_EXTERN(int) git_config_parse_int64(int64_t *out, const char *value);
...
@@ -717,6 +731,7 @@ GIT_EXTERN(int) git_config_parse_int64(int64_t *out, const char *value);
*
*
* @param out placae to store the result of parsing
* @param out placae to store the result of parsing
* @param value the path to evaluate
* @param value the path to evaluate
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_parse_path
(
git_buf
*
out
,
const
char
*
value
);
GIT_EXTERN
(
int
)
git_config_parse_path
(
git_buf
*
out
,
const
char
*
value
);
...
@@ -735,6 +750,7 @@ GIT_EXTERN(int) git_config_parse_path(git_buf *out, const char *value);
...
@@ -735,6 +750,7 @@ GIT_EXTERN(int) git_config_parse_path(git_buf *out, const char *value);
* @param regexp regular expression to match against config names (can be NULL)
* @param regexp regular expression to match against config names (can be NULL)
* @param callback the function to call on each variable
* @param callback the function to call on each variable
* @param payload the data to pass to the callback
* @param payload the data to pass to the callback
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_config_backend_foreach_match
(
GIT_EXTERN
(
int
)
git_config_backend_foreach_match
(
git_config_backend
*
backend
,
git_config_backend
*
backend
,
...
...
include/git2/credential.h
View file @
258df9c1
...
@@ -254,6 +254,7 @@ typedef void GIT_CALLBACK(git_credential_ssh_interactive_cb)(
...
@@ -254,6 +254,7 @@ typedef void GIT_CALLBACK(git_credential_ssh_interactive_cb)(
* Create a new ssh keyboard-interactive based credential object.
* Create a new ssh keyboard-interactive based credential object.
* The supplied credential parameter will be internally duplicated.
* The supplied credential parameter will be internally duplicated.
*
*
* @param out The newly created credential object.
* @param username Username to use to authenticate.
* @param username Username to use to authenticate.
* @param prompt_callback The callback method used for prompts.
* @param prompt_callback The callback method used for prompts.
* @param payload Additional data to pass to the callback.
* @param payload Additional data to pass to the callback.
...
...
include/git2/credential_helpers.h
View file @
258df9c1
...
@@ -39,6 +39,7 @@ typedef struct git_credential_userpass_payload {
...
@@ -39,6 +39,7 @@ typedef struct git_credential_userpass_payload {
* @param allowed_types A bitmask stating which credential types are OK to return.
* @param allowed_types A bitmask stating which credential types are OK to return.
* @param payload The payload provided when specifying this callback. (This is
* @param payload The payload provided when specifying this callback. (This is
* interpreted as a `git_credential_userpass_payload*`.)
* interpreted as a `git_credential_userpass_payload*`.)
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_credential_userpass
(
GIT_EXTERN
(
int
)
git_credential_userpass
(
git_credential
**
out
,
git_credential
**
out
,
...
...
include/git2/describe.h
View file @
258df9c1
...
@@ -142,6 +142,7 @@ typedef struct git_describe_result git_describe_result;
...
@@ -142,6 +142,7 @@ typedef struct git_describe_result git_describe_result;
* you're done with it.
* you're done with it.
* @param committish a committish to describe
* @param committish a committish to describe
* @param opts the lookup options (or NULL for defaults)
* @param opts the lookup options (or NULL for defaults)
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_describe_commit
(
GIT_EXTERN
(
int
)
git_describe_commit
(
git_describe_result
**
result
,
git_describe_result
**
result
,
...
@@ -159,6 +160,7 @@ GIT_EXTERN(int) git_describe_commit(
...
@@ -159,6 +160,7 @@ GIT_EXTERN(int) git_describe_commit(
* you're done with it.
* you're done with it.
* @param repo the repository in which to perform the describe
* @param repo the repository in which to perform the describe
* @param opts the lookup options (or NULL for defaults)
* @param opts the lookup options (or NULL for defaults)
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_describe_workdir
(
GIT_EXTERN
(
int
)
git_describe_workdir
(
git_describe_result
**
out
,
git_describe_result
**
out
,
...
@@ -172,6 +174,7 @@ GIT_EXTERN(int) git_describe_workdir(
...
@@ -172,6 +174,7 @@ GIT_EXTERN(int) git_describe_workdir(
* @param result the result from `git_describe_commit()` or
* @param result the result from `git_describe_commit()` or
* `git_describe_workdir()`.
* `git_describe_workdir()`.
* @param opts the formatting options (or NULL for defaults)
* @param opts the formatting options (or NULL for defaults)
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_describe_format
(
GIT_EXTERN
(
int
)
git_describe_format
(
git_buf
*
out
,
git_buf
*
out
,
...
@@ -180,6 +183,8 @@ GIT_EXTERN(int) git_describe_format(
...
@@ -180,6 +183,8 @@ GIT_EXTERN(int) git_describe_format(
/**
/**
* Free the describe result.
* Free the describe result.
*
* @param result The result to free.
*/
*/
GIT_EXTERN
(
void
)
git_describe_result_free
(
git_describe_result
*
result
);
GIT_EXTERN
(
void
)
git_describe_result_free
(
git_describe_result
*
result
);
...
...
include/git2/diff.h
View file @
258df9c1
...
@@ -831,6 +831,7 @@ GIT_EXTERN(void) git_diff_free(git_diff *diff);
...
@@ -831,6 +831,7 @@ GIT_EXTERN(void) git_diff_free(git_diff *diff);
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param new_tree A git_tree object to diff to, or NULL for empty tree.
* @param new_tree A git_tree object to diff to, or NULL for empty tree.
* @param opts Structure with options to influence diff or NULL for defaults.
* @param opts Structure with options to influence diff or NULL for defaults.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_diff_tree_to_tree
(
GIT_EXTERN
(
int
)
git_diff_tree_to_tree
(
git_diff
**
diff
,
git_diff
**
diff
,
...
@@ -857,6 +858,7 @@ GIT_EXTERN(int) git_diff_tree_to_tree(
...
@@ -857,6 +858,7 @@ GIT_EXTERN(int) git_diff_tree_to_tree(
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param index The index to diff with; repo index used if NULL.
* @param index The index to diff with; repo index used if NULL.
* @param opts Structure with options to influence diff or NULL for defaults.
* @param opts Structure with options to influence diff or NULL for defaults.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_diff_tree_to_index
(
GIT_EXTERN
(
int
)
git_diff_tree_to_index
(
git_diff
**
diff
,
git_diff
**
diff
,
...
@@ -884,6 +886,7 @@ GIT_EXTERN(int) git_diff_tree_to_index(
...
@@ -884,6 +886,7 @@ GIT_EXTERN(int) git_diff_tree_to_index(
* @param repo The repository.
* @param repo The repository.
* @param index The index to diff from; repo index used if NULL.
* @param index The index to diff from; repo index used if NULL.
* @param opts Structure with options to influence diff or NULL for defaults.
* @param opts Structure with options to influence diff or NULL for defaults.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_diff_index_to_workdir
(
GIT_EXTERN
(
int
)
git_diff_index_to_workdir
(
git_diff
**
diff
,
git_diff
**
diff
,
...
@@ -913,6 +916,7 @@ GIT_EXTERN(int) git_diff_index_to_workdir(
...
@@ -913,6 +916,7 @@ GIT_EXTERN(int) git_diff_index_to_workdir(
* @param repo The repository containing the tree.
* @param repo The repository containing the tree.
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param opts Structure with options to influence diff or NULL for defaults.
* @param opts Structure with options to influence diff or NULL for defaults.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_diff_tree_to_workdir
(
GIT_EXTERN
(
int
)
git_diff_tree_to_workdir
(
git_diff
**
diff
,
git_diff
**
diff
,
...
@@ -932,6 +936,7 @@ GIT_EXTERN(int) git_diff_tree_to_workdir(
...
@@ -932,6 +936,7 @@ GIT_EXTERN(int) git_diff_tree_to_workdir(
* @param repo The repository containing the tree.
* @param repo The repository containing the tree.
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param old_tree A git_tree object to diff from, or NULL for empty tree.
* @param opts Structure with options to influence diff or NULL for defaults.
* @param opts Structure with options to influence diff or NULL for defaults.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_diff_tree_to_workdir_with_index
(
GIT_EXTERN
(
int
)
git_diff_tree_to_workdir_with_index
(
git_diff
**
diff
,
git_diff
**
diff
,
...
@@ -950,6 +955,7 @@ GIT_EXTERN(int) git_diff_tree_to_workdir_with_index(
...
@@ -950,6 +955,7 @@ GIT_EXTERN(int) git_diff_tree_to_workdir_with_index(
* @param old_index A git_index object to diff from.
* @param old_index A git_index object to diff from.
* @param new_index A git_index object to diff to.
* @param new_index A git_index object to diff to.
* @param opts Structure with options to influence diff or NULL for defaults.
* @param opts Structure with options to influence diff or NULL for defaults.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_diff_index_to_index
(
GIT_EXTERN
(
int
)
git_diff_index_to_index
(
git_diff
**
diff
,
git_diff
**
diff
,
...
@@ -970,6 +976,7 @@ GIT_EXTERN(int) git_diff_index_to_index(
...
@@ -970,6 +976,7 @@ GIT_EXTERN(int) git_diff_index_to_index(
*
*
* @param onto Diff to merge into.
* @param onto Diff to merge into.
* @param from Diff to merge.
* @param from Diff to merge.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_diff_merge
(
GIT_EXTERN
(
int
)
git_diff_merge
(
git_diff
*
onto
,
git_diff
*
onto
,
...
...
include/git2/filter.h
View file @
258df9c1
...
@@ -196,6 +196,7 @@ GIT_EXTERN(int) git_filter_list_apply_to_buffer(
...
@@ -196,6 +196,7 @@ GIT_EXTERN(int) git_filter_list_apply_to_buffer(
* @param repo the repository in which to perform the filtering
* @param repo the repository in which to perform the filtering
* @param path the path of the file to filter, a relative path will be
* @param path the path of the file to filter, a relative path will be
* taken as relative to the workdir
* taken as relative to the workdir
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_filter_list_apply_to_file
(
GIT_EXTERN
(
int
)
git_filter_list_apply_to_file
(
git_buf
*
out
,
git_buf
*
out
,
...
@@ -209,6 +210,7 @@ GIT_EXTERN(int) git_filter_list_apply_to_file(
...
@@ -209,6 +210,7 @@ GIT_EXTERN(int) git_filter_list_apply_to_file(
* @param out buffer into which to store the filtered file
* @param out buffer into which to store the filtered file
* @param filters the list of filters to apply
* @param filters the list of filters to apply
* @param blob the blob to filter
* @param blob the blob to filter
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_filter_list_apply_to_blob
(
GIT_EXTERN
(
int
)
git_filter_list_apply_to_blob
(
git_buf
*
out
,
git_buf
*
out
,
...
@@ -222,6 +224,7 @@ GIT_EXTERN(int) git_filter_list_apply_to_blob(
...
@@ -222,6 +224,7 @@ GIT_EXTERN(int) git_filter_list_apply_to_blob(
* @param buffer the buffer to filter
* @param buffer the buffer to filter
* @param len the size of the buffer
* @param len the size of the buffer
* @param target the stream into which the data will be written
* @param target the stream into which the data will be written
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_filter_list_stream_buffer
(
GIT_EXTERN
(
int
)
git_filter_list_stream_buffer
(
git_filter_list
*
filters
,
git_filter_list
*
filters
,
...
@@ -237,6 +240,7 @@ GIT_EXTERN(int) git_filter_list_stream_buffer(
...
@@ -237,6 +240,7 @@ GIT_EXTERN(int) git_filter_list_stream_buffer(
* @param path the path of the file to filter, a relative path will be
* @param path the path of the file to filter, a relative path will be
* taken as relative to the workdir
* taken as relative to the workdir
* @param target the stream into which the data will be written
* @param target the stream into which the data will be written
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_filter_list_stream_file
(
GIT_EXTERN
(
int
)
git_filter_list_stream_file
(
git_filter_list
*
filters
,
git_filter_list
*
filters
,
...
@@ -250,6 +254,7 @@ GIT_EXTERN(int) git_filter_list_stream_file(
...
@@ -250,6 +254,7 @@ GIT_EXTERN(int) git_filter_list_stream_file(
* @param filters the list of filters to apply
* @param filters the list of filters to apply
* @param blob the blob to filter
* @param blob the blob to filter
* @param target the stream into which the data will be written
* @param target the stream into which the data will be written
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_filter_list_stream_blob
(
GIT_EXTERN
(
int
)
git_filter_list_stream_blob
(
git_filter_list
*
filters
,
git_filter_list
*
filters
,
...
...
include/git2/graph.h
View file @
258df9c1
...
@@ -33,6 +33,7 @@ GIT_BEGIN_DECL
...
@@ -33,6 +33,7 @@ GIT_BEGIN_DECL
* @param repo the repository where the commits exist
* @param repo the repository where the commits exist
* @param local the commit for local
* @param local the commit for local
* @param upstream the commit for upstream
* @param upstream the commit for upstream
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_graph_ahead_behind
(
size_t
*
ahead
,
size_t
*
behind
,
git_repository
*
repo
,
const
git_oid
*
local
,
const
git_oid
*
upstream
);
GIT_EXTERN
(
int
)
git_graph_ahead_behind
(
size_t
*
ahead
,
size_t
*
behind
,
git_repository
*
repo
,
const
git_oid
*
local
,
const
git_oid
*
upstream
);
...
...
include/git2/ignore.h
View file @
258df9c1
...
@@ -29,7 +29,7 @@ GIT_BEGIN_DECL
...
@@ -29,7 +29,7 @@ GIT_BEGIN_DECL
* This would add three rules to the ignores.
* This would add three rules to the ignores.
*
*
* @param repo The repository to add ignore rules to.
* @param repo The repository to add ignore rules to.
* @param rules Text of rules,
a la the contents of
a .gitignore file.
* @param rules Text of rules,
the contents to add on
a .gitignore file.
* It is okay to have multiple rules in the text; if so,
* It is okay to have multiple rules in the text; if so,
* each rule should be terminated with a newline.
* each rule should be terminated with a newline.
* @return 0 on success
* @return 0 on success
...
...
include/git2/index.h
View file @
258df9c1
...
@@ -491,6 +491,7 @@ GIT_EXTERN(int) git_index_entry_is_conflict(const git_index_entry *entry);
...
@@ -491,6 +491,7 @@ GIT_EXTERN(int) git_index_entry_is_conflict(const git_index_entry *entry);
*
*
* @param iterator_out The newly created iterator
* @param iterator_out The newly created iterator
* @param index The index to iterate
* @param index The index to iterate
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_index_iterator_new
(
GIT_EXTERN
(
int
)
git_index_iterator_new
(
git_index_iterator
**
iterator_out
,
git_index_iterator
**
iterator_out
,
...
@@ -787,6 +788,7 @@ GIT_EXTERN(int) git_index_conflict_cleanup(git_index *index);
...
@@ -787,6 +788,7 @@ GIT_EXTERN(int) git_index_conflict_cleanup(git_index *index);
/**
/**
* Determine if the index contains entries representing file conflicts.
* Determine if the index contains entries representing file conflicts.
*
*
* @param index An existing index object.
* @return 1 if at least one conflict is found, 0 otherwise.
* @return 1 if at least one conflict is found, 0 otherwise.
*/
*/
GIT_EXTERN
(
int
)
git_index_has_conflicts
(
const
git_index
*
index
);
GIT_EXTERN
(
int
)
git_index_has_conflicts
(
const
git_index
*
index
);
...
@@ -811,6 +813,7 @@ GIT_EXTERN(int) git_index_conflict_iterator_new(
...
@@ -811,6 +813,7 @@ GIT_EXTERN(int) git_index_conflict_iterator_new(
* @param ancestor_out Pointer to store the ancestor side of the conflict
* @param ancestor_out Pointer to store the ancestor side of the conflict
* @param our_out Pointer to store our side of the conflict
* @param our_out Pointer to store our side of the conflict
* @param their_out Pointer to store their side of the conflict
* @param their_out Pointer to store their side of the conflict
* @param iterator The conflict iterator.
* @return 0 (no error), GIT_ITEROVER (iteration is done) or an error code
* @return 0 (no error), GIT_ITEROVER (iteration is done) or an error code
* (negative value)
* (negative value)
*/
*/
...
...
include/git2/indexer.h
View file @
258df9c1
...
@@ -98,6 +98,7 @@ GIT_EXTERN(int) git_indexer_options_init(
...
@@ -98,6 +98,7 @@ GIT_EXTERN(int) git_indexer_options_init(
* will be returned if there are bases missing)
* will be returned if there are bases missing)
* @param opts Optional structure containing additional options. See
* @param opts Optional structure containing additional options. See
* `git_indexer_options` above.
* `git_indexer_options` above.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_indexer_new
(
GIT_EXTERN
(
int
)
git_indexer_new
(
git_indexer
**
out
,
git_indexer
**
out
,
...
@@ -113,6 +114,7 @@ GIT_EXTERN(int) git_indexer_new(
...
@@ -113,6 +114,7 @@ GIT_EXTERN(int) git_indexer_new(
* @param data the data to add
* @param data the data to add
* @param size the size of the data in bytes
* @param size the size of the data in bytes
* @param stats stat storage
* @param stats stat storage
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_indexer_append
(
git_indexer
*
idx
,
const
void
*
data
,
size_t
size
,
git_indexer_progress
*
stats
);
GIT_EXTERN
(
int
)
git_indexer_append
(
git_indexer
*
idx
,
const
void
*
data
,
size_t
size
,
git_indexer_progress
*
stats
);
...
@@ -122,6 +124,8 @@ GIT_EXTERN(int) git_indexer_append(git_indexer *idx, const void *data, size_t si
...
@@ -122,6 +124,8 @@ GIT_EXTERN(int) git_indexer_append(git_indexer *idx, const void *data, size_t si
* Resolve any pending deltas and write out the index file
* Resolve any pending deltas and write out the index file
*
*
* @param idx the indexer
* @param idx the indexer
* @param stats Stat storage.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_indexer_commit
(
git_indexer
*
idx
,
git_indexer_progress
*
stats
);
GIT_EXTERN
(
int
)
git_indexer_commit
(
git_indexer
*
idx
,
git_indexer_progress
*
stats
);
...
@@ -132,6 +136,7 @@ GIT_EXTERN(int) git_indexer_commit(git_indexer *idx, git_indexer_progress *stats
...
@@ -132,6 +136,7 @@ GIT_EXTERN(int) git_indexer_commit(git_indexer *idx, git_indexer_progress *stats
* names. This is only correct after the index has been finalized.
* names. This is only correct after the index has been finalized.
*
*
* @param idx the indexer instance
* @param idx the indexer instance
* @return the packfile's hash
*/
*/
GIT_EXTERN
(
const
git_oid
*
)
git_indexer_hash
(
const
git_indexer
*
idx
);
GIT_EXTERN
(
const
git_oid
*
)
git_indexer_hash
(
const
git_indexer
*
idx
);
...
...
include/git2/merge.h
View file @
258df9c1
...
@@ -372,6 +372,7 @@ typedef enum {
...
@@ -372,6 +372,7 @@ typedef enum {
* merging them into the HEAD of the repository.
* merging them into the HEAD of the repository.
*
*
* @param analysis_out analysis enumeration that the result is written into
* @param analysis_out analysis enumeration that the result is written into
* @param preference_out One of the `git_merge_preference_t` flag.
* @param repo the repository to merge
* @param repo the repository to merge
* @param their_heads the heads to merge into
* @param their_heads the heads to merge into
* @param their_heads_len the number of heads to merge
* @param their_heads_len the number of heads to merge
...
@@ -389,6 +390,7 @@ GIT_EXTERN(int) git_merge_analysis(
...
@@ -389,6 +390,7 @@ GIT_EXTERN(int) git_merge_analysis(
* merging them into a reference.
* merging them into a reference.
*
*
* @param analysis_out analysis enumeration that the result is written into
* @param analysis_out analysis enumeration that the result is written into
* @param preference_out One of the `git_merge_preference_t` flag.
* @param repo the repository to merge
* @param repo the repository to merge
* @param our_ref the reference to perform the analysis from
* @param our_ref the reference to perform the analysis from
* @param their_heads the heads to merge into
* @param their_heads the heads to merge into
...
...
include/git2/message.h
View file @
258df9c1
...
@@ -75,6 +75,8 @@ GIT_EXTERN(int) git_message_trailers(git_message_trailer_array *arr, const char
...
@@ -75,6 +75,8 @@ GIT_EXTERN(int) git_message_trailers(git_message_trailer_array *arr, const char
/**
/**
* Clean's up any allocated memory in the git_message_trailer_array filled by
* Clean's up any allocated memory in the git_message_trailer_array filled by
* a call to git_message_trailers.
* a call to git_message_trailers.
*
* @param arr The trailer to free.
*/
*/
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
);
...
...
include/git2/object.h
View file @
258df9c1
...
@@ -221,6 +221,7 @@ GIT_EXTERN(int) git_object_peel(
...
@@ -221,6 +221,7 @@ GIT_EXTERN(int) git_object_peel(
*
*
* @param dest Pointer to store the copy of the object
* @param dest Pointer to store the copy of the object
* @param source Original object to copy
* @param source Original object to copy
* @return 0 or an error code
*/
*/
GIT_EXTERN
(
int
)
git_object_dup
(
git_object
**
dest
,
git_object
*
source
);
GIT_EXTERN
(
int
)
git_object_dup
(
git_object
**
dest
,
git_object
*
source
);
...
...
include/git2/odb.h
View file @
258df9c1
...
@@ -214,12 +214,13 @@ typedef struct git_odb_expand_id {
...
@@ -214,12 +214,13 @@ typedef struct git_odb_expand_id {
/**
/**
* Determine if one or more objects can be found in the object database
* Determine if one or more objects can be found in the object database
* by their abbreviated object ID and type. The given array will be
* by their abbreviated object ID and type.
* updated in place: for each abbreviated ID that is unique in the
*
* database, and of the given type (if specified), the full object ID,
* The given array will be updated in place: for each abbreviated ID that is
* object ID length (`GIT_OID_HEXSZ`) and type will be written back to
* unique in the database, and of the given type (if specified),
* the array. For IDs that are not found (or are ambiguous), the
* the full object ID, object ID length (`GIT_OID_HEXSZ`) and type will be
* array entry will be zeroed.
* written back to the array. For IDs that are not found (or are ambiguous),
* the array entry will be zeroed.
*
*
* Note that since this function operates on multiple objects, the
* Note that since this function operates on multiple objects, the
* underlying database will not be asked to be reloaded if an object is
* underlying database will not be asked to be reloaded if an object is
...
@@ -345,6 +346,11 @@ GIT_EXTERN(int) git_odb_stream_finalize_write(git_oid *out, git_odb_stream *stre
...
@@ -345,6 +346,11 @@ GIT_EXTERN(int) git_odb_stream_finalize_write(git_oid *out, git_odb_stream *stre
* Read from an odb stream
* Read from an odb stream
*
*
* Most backends don't implement streaming reads
* Most backends don't implement streaming reads
*
* @param stream the stream
* @param buffer a user-allocated buffer to store the data in.
* @param len the buffer's length
* @return 0 if the read succeeded, error code otherwise
*/
*/
GIT_EXTERN
(
int
)
git_odb_stream_read
(
git_odb_stream
*
stream
,
char
*
buffer
,
size_t
len
);
GIT_EXTERN
(
int
)
git_odb_stream_read
(
git_odb_stream
*
stream
,
char
*
buffer
,
size_t
len
);
...
@@ -405,6 +411,7 @@ GIT_EXTERN(int) git_odb_open_rstream(
...
@@ -405,6 +411,7 @@ GIT_EXTERN(int) git_odb_open_rstream(
* Be aware that this is called inline with network and indexing operations,
* Be aware that this is called inline with network and indexing operations,
* so performance may be affected.
* so performance may be affected.
* @param progress_payload payload for the progress callback
* @param progress_payload payload for the progress callback
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_odb_write_pack
(
GIT_EXTERN
(
int
)
git_odb_write_pack
(
git_odb_writepack
**
out
,
git_odb_writepack
**
out
,
...
@@ -422,6 +429,7 @@ GIT_EXTERN(int) git_odb_write_pack(
...
@@ -422,6 +429,7 @@ GIT_EXTERN(int) git_odb_write_pack(
* exist).
* exist).
*
*
* @param db object database where the `multi-pack-index` file will be written.
* @param db object database where the `multi-pack-index` file will be written.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_odb_write_multi_pack_index
(
GIT_EXTERN
(
int
)
git_odb_write_multi_pack_index
(
git_odb
*
db
);
git_odb
*
db
);
...
...
include/git2/pack.h
View file @
258df9c1
...
@@ -148,6 +148,7 @@ GIT_EXTERN(int) git_packbuilder_insert_recur(git_packbuilder *pb, const git_oid
...
@@ -148,6 +148,7 @@ GIT_EXTERN(int) git_packbuilder_insert_recur(git_packbuilder *pb, const git_oid
*
*
* @param buf Buffer where to write the packfile
* @param buf Buffer where to write the packfile
* @param pb The packbuilder
* @param pb The packbuilder
* @return 0 or an error code
*/
*/
GIT_EXTERN
(
int
)
git_packbuilder_write_buf
(
git_buf
*
buf
,
git_packbuilder
*
pb
);
GIT_EXTERN
(
int
)
git_packbuilder_write_buf
(
git_buf
*
buf
,
git_packbuilder
*
pb
);
...
@@ -176,6 +177,7 @@ GIT_EXTERN(int) git_packbuilder_write(
...
@@ -176,6 +177,7 @@ GIT_EXTERN(int) git_packbuilder_write(
* names. This is only correct after the packfile has been written.
* names. This is only correct after the packfile has been written.
*
*
* @param pb The packbuilder object
* @param pb The packbuilder object
* @return 0 or an error code
*/
*/
GIT_EXTERN
(
const
git_oid
*
)
git_packbuilder_hash
(
git_packbuilder
*
pb
);
GIT_EXTERN
(
const
git_oid
*
)
git_packbuilder_hash
(
git_packbuilder
*
pb
);
...
...
include/git2/patch.h
View file @
258df9c1
...
@@ -139,17 +139,25 @@ GIT_EXTERN(int) git_patch_from_buffers(
...
@@ -139,17 +139,25 @@ GIT_EXTERN(int) git_patch_from_buffers(
/**
/**
* Free a git_patch object.
* Free a git_patch object.
*
* @param patch The patch to free.
*/
*/
GIT_EXTERN
(
void
)
git_patch_free
(
git_patch
*
patch
);
GIT_EXTERN
(
void
)
git_patch_free
(
git_patch
*
patch
);
/**
/**
* Get the delta associated with a patch. This delta points to internal
* Get the delta associated with a patch. This delta points to internal
* data and you do not have to release it when you are done with it.
* data and you do not have to release it when you are done with it.
*
* @param patch The patch in which to get the delta.
* @return The delta associated with the patch.
*/
*/
GIT_EXTERN
(
const
git_diff_delta
*
)
git_patch_get_delta
(
const
git_patch
*
patch
);
GIT_EXTERN
(
const
git_diff_delta
*
)
git_patch_get_delta
(
const
git_patch
*
patch
);
/**
/**
* Get the number of hunks in a patch
* Get the number of hunks in a patch
*
* @param patch The patch in which to get the number of hunks.
* @return The number of hunks of the patch.
*/
*/
GIT_EXTERN
(
size_t
)
git_patch_num_hunks
(
const
git_patch
*
patch
);
GIT_EXTERN
(
size_t
)
git_patch_num_hunks
(
const
git_patch
*
patch
);
...
...
include/git2/rebase.h
View file @
258df9c1
...
@@ -242,6 +242,7 @@ GIT_EXTERN(int) git_rebase_open(
...
@@ -242,6 +242,7 @@ GIT_EXTERN(int) git_rebase_open(
/**
/**
* Gets the original `HEAD` ref name for merge rebases.
* Gets the original `HEAD` ref name for merge rebases.
*
*
* @param rebase The in-progress rebase.
* @return The original `HEAD` ref name
* @return The original `HEAD` ref name
*/
*/
GIT_EXTERN
(
const
char
*
)
git_rebase_orig_head_name
(
git_rebase
*
rebase
);
GIT_EXTERN
(
const
char
*
)
git_rebase_orig_head_name
(
git_rebase
*
rebase
);
...
@@ -249,6 +250,7 @@ GIT_EXTERN(const char *) git_rebase_orig_head_name(git_rebase *rebase);
...
@@ -249,6 +250,7 @@ GIT_EXTERN(const char *) git_rebase_orig_head_name(git_rebase *rebase);
/**
/**
* Gets the original `HEAD` id for merge rebases.
* Gets the original `HEAD` id for merge rebases.
*
*
* @param rebase The in-progress rebase.
* @return The original `HEAD` id
* @return The original `HEAD` id
*/
*/
GIT_EXTERN
(
const
git_oid
*
)
git_rebase_orig_head_id
(
git_rebase
*
rebase
);
GIT_EXTERN
(
const
git_oid
*
)
git_rebase_orig_head_id
(
git_rebase
*
rebase
);
...
@@ -256,6 +258,7 @@ GIT_EXTERN(const git_oid *) git_rebase_orig_head_id(git_rebase *rebase);
...
@@ -256,6 +258,7 @@ GIT_EXTERN(const git_oid *) git_rebase_orig_head_id(git_rebase *rebase);
/**
/**
* Gets the `onto` ref name for merge rebases.
* Gets the `onto` ref name for merge rebases.
*
*
* @param rebase The in-progress rebase.
* @return The `onto` ref name
* @return The `onto` ref name
*/
*/
GIT_EXTERN
(
const
char
*
)
git_rebase_onto_name
(
git_rebase
*
rebase
);
GIT_EXTERN
(
const
char
*
)
git_rebase_onto_name
(
git_rebase
*
rebase
);
...
@@ -263,6 +266,7 @@ GIT_EXTERN(const char *) git_rebase_onto_name(git_rebase *rebase);
...
@@ -263,6 +266,7 @@ GIT_EXTERN(const char *) git_rebase_onto_name(git_rebase *rebase);
/**
/**
* Gets the `onto` id for merge rebases.
* Gets the `onto` id for merge rebases.
*
*
* @param rebase The in-progress rebase.
* @return The `onto` id
* @return The `onto` id
*/
*/
GIT_EXTERN
(
const
git_oid
*
)
git_rebase_onto_id
(
git_rebase
*
rebase
);
GIT_EXTERN
(
const
git_oid
*
)
git_rebase_onto_id
(
git_rebase
*
rebase
);
...
@@ -322,6 +326,10 @@ GIT_EXTERN(int) git_rebase_next(
...
@@ -322,6 +326,10 @@ GIT_EXTERN(int) git_rebase_next(
* This is only applicable for in-memory rebases; for rebases within
* This is only applicable for in-memory rebases; for rebases within
* a working directory, the changes were applied to the repository's
* a working directory, the changes were applied to the repository's
* index.
* index.
*
* @param index The result index of the last operation.
* @param rebase The in-progress rebase.
* @return 0 or an error code
*/
*/
GIT_EXTERN
(
int
)
git_rebase_inmemory_index
(
GIT_EXTERN
(
int
)
git_rebase_inmemory_index
(
git_index
**
index
,
git_index
**
index
,
...
...
include/git2/refdb.h
View file @
258df9c1
...
@@ -52,6 +52,9 @@ GIT_EXTERN(int) git_refdb_open(git_refdb **out, git_repository *repo);
...
@@ -52,6 +52,9 @@ GIT_EXTERN(int) git_refdb_open(git_refdb **out, git_repository *repo);
* Suggests that the given refdb compress or optimize its references.
* Suggests that the given refdb compress or optimize its references.
* This mechanism is implementation specific. For on-disk reference
* This mechanism is implementation specific. For on-disk reference
* databases, for example, this may pack all loose references.
* databases, for example, this may pack all loose references.
*
* @param refdb The reference database to optimize.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_refdb_compress
(
git_refdb
*
refdb
);
GIT_EXTERN
(
int
)
git_refdb_compress
(
git_refdb
*
refdb
);
...
...
include/git2/remote.h
View file @
258df9c1
...
@@ -324,6 +324,7 @@ GIT_EXTERN(int) git_remote_add_fetch(git_repository *repo, const char *remote, c
...
@@ -324,6 +324,7 @@ GIT_EXTERN(int) git_remote_add_fetch(git_repository *repo, const char *remote, c
*
*
* @param array pointer to the array in which to store the strings
* @param array pointer to the array in which to store the strings
* @param remote the remote to query
* @param remote the remote to query
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_remote_get_fetch_refspecs
(
git_strarray
*
array
,
const
git_remote
*
remote
);
GIT_EXTERN
(
int
)
git_remote_get_fetch_refspecs
(
git_strarray
*
array
,
const
git_remote
*
remote
);
...
@@ -348,6 +349,7 @@ GIT_EXTERN(int) git_remote_add_push(git_repository *repo, const char *remote, co
...
@@ -348,6 +349,7 @@ GIT_EXTERN(int) git_remote_add_push(git_repository *repo, const char *remote, co
*
*
* @param array pointer to the array in which to store the strings
* @param array pointer to the array in which to store the strings
* @param remote the remote to query
* @param remote the remote to query
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_remote_get_push_refspecs
(
git_strarray
*
array
,
const
git_remote
*
remote
);
GIT_EXTERN
(
int
)
git_remote_get_push_refspecs
(
git_strarray
*
array
,
const
git_remote
*
remote
);
...
@@ -1042,6 +1044,7 @@ GIT_EXTERN(int) git_remote_prune(
...
@@ -1042,6 +1044,7 @@ GIT_EXTERN(int) git_remote_prune(
* @param refspecs the refspecs to use for pushing. If NULL or an empty
* @param refspecs the refspecs to use for pushing. If NULL or an empty
* array, the configured refspecs will be used
* array, the configured refspecs will be used
* @param opts options to use for this push
* @param opts options to use for this push
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_remote_push
(
GIT_EXTERN
(
int
)
git_remote_push
(
git_remote
*
remote
,
git_remote
*
remote
,
...
...
include/git2/repository.h
View file @
258df9c1
...
@@ -673,6 +673,9 @@ GIT_EXTERN(int) git_repository_message(git_buf *out, git_repository *repo);
...
@@ -673,6 +673,9 @@ GIT_EXTERN(int) git_repository_message(git_buf *out, git_repository *repo);
* Remove git's prepared message.
* Remove git's prepared message.
*
*
* Remove the message that `git_repository_message` retrieves.
* Remove the message that `git_repository_message` retrieves.
*
* @param repo Repository to remove prepared message from.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_repository_message_remove
(
git_repository
*
repo
);
GIT_EXTERN
(
int
)
git_repository_message_remove
(
git_repository
*
repo
);
...
@@ -928,6 +931,7 @@ GIT_EXTERN(int) git_repository_is_shallow(git_repository *repo);
...
@@ -928,6 +931,7 @@ GIT_EXTERN(int) git_repository_is_shallow(git_repository *repo);
* @param name where to store the pointer to the name
* @param name where to store the pointer to the name
* @param email where to store the pointer to the email
* @param email where to store the pointer to the email
* @param repo the repository
* @param repo the repository
* @return 0 or an error code
*/
*/
GIT_EXTERN
(
int
)
git_repository_ident
(
const
char
**
name
,
const
char
**
email
,
const
git_repository
*
repo
);
GIT_EXTERN
(
int
)
git_repository_ident
(
const
char
**
name
,
const
char
**
email
,
const
git_repository
*
repo
);
...
@@ -941,6 +945,7 @@ GIT_EXTERN(int) git_repository_ident(const char **name, const char **email, cons
...
@@ -941,6 +945,7 @@ GIT_EXTERN(int) git_repository_ident(const char **name, const char **email, cons
* @param repo the repository to configure
* @param repo the repository to configure
* @param name the name to use for the reflog entries
* @param name the name to use for the reflog entries
* @param email the email to use for the reflog entries
* @param email the email to use for the reflog entries
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_repository_set_ident
(
git_repository
*
repo
,
const
char
*
name
,
const
char
*
email
);
GIT_EXTERN
(
int
)
git_repository_set_ident
(
git_repository
*
repo
,
const
char
*
name
,
const
char
*
email
);
...
...
include/git2/revwalk.h
View file @
258df9c1
...
@@ -249,6 +249,7 @@ GIT_EXTERN(int) git_revwalk_push_range(git_revwalk *walk, const char *range);
...
@@ -249,6 +249,7 @@ GIT_EXTERN(int) git_revwalk_push_range(git_revwalk *walk, const char *range);
*
*
* No parents other than the first for each commit will be enqueued.
* No parents other than the first for each commit will be enqueued.
*
*
* @param walk The revision walker.
* @return 0 or an error code
* @return 0 or an error code
*/
*/
GIT_EXTERN
(
int
)
git_revwalk_simplify_first_parent
(
git_revwalk
*
walk
);
GIT_EXTERN
(
int
)
git_revwalk_simplify_first_parent
(
git_revwalk
*
walk
);
...
@@ -277,6 +278,7 @@ GIT_EXTERN(git_repository *) git_revwalk_repository(git_revwalk *walk);
...
@@ -277,6 +278,7 @@ GIT_EXTERN(git_repository *) git_revwalk_repository(git_revwalk *walk);
*
*
* @param commit_id oid of Commit
* @param commit_id oid of Commit
* @param payload User-specified pointer to data to be passed as data payload
* @param payload User-specified pointer to data to be passed as data payload
* @return non-zero to hide the commmit and it parent.
*/
*/
typedef
int
GIT_CALLBACK
(
git_revwalk_hide_cb
)(
typedef
int
GIT_CALLBACK
(
git_revwalk_hide_cb
)(
const
git_oid
*
commit_id
,
const
git_oid
*
commit_id
,
...
@@ -288,6 +290,7 @@ typedef int GIT_CALLBACK(git_revwalk_hide_cb)(
...
@@ -288,6 +290,7 @@ typedef int GIT_CALLBACK(git_revwalk_hide_cb)(
* @param walk the revision walker
* @param walk the revision walker
* @param hide_cb callback function to hide a commit and its parents
* @param hide_cb callback function to hide a commit and its parents
* @param payload data payload to be passed to callback function
* @param payload data payload to be passed to callback function
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_revwalk_add_hide_cb
(
GIT_EXTERN
(
int
)
git_revwalk_add_hide_cb
(
git_revwalk
*
walk
,
git_revwalk
*
walk
,
...
...
include/git2/submodule.h
View file @
258df9c1
...
@@ -229,6 +229,7 @@ GIT_EXTERN(int) git_submodule_lookup(
...
@@ -229,6 +229,7 @@ GIT_EXTERN(int) git_submodule_lookup(
*
*
* @param out Pointer to store the copy of the submodule.
* @param out Pointer to store the copy of the submodule.
* @param source Original submodule to copy.
* @param source Original submodule to copy.
* @return 0
*/
*/
GIT_EXTERN
(
int
)
git_submodule_dup
(
git_submodule
**
out
,
git_submodule
*
source
);
GIT_EXTERN
(
int
)
git_submodule_dup
(
git_submodule
**
out
,
git_submodule
*
source
);
...
@@ -320,6 +321,7 @@ GIT_EXTERN(int) git_submodule_clone(
...
@@ -320,6 +321,7 @@ GIT_EXTERN(int) git_submodule_clone(
* (but doesn't actually do the commit).
* (but doesn't actually do the commit).
*
*
* @param submodule The submodule to finish adding.
* @param submodule The submodule to finish adding.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_submodule_add_finalize
(
git_submodule
*
submodule
);
GIT_EXTERN
(
int
)
git_submodule_add_finalize
(
git_submodule
*
submodule
);
...
@@ -589,6 +591,9 @@ GIT_EXTERN(int) git_submodule_repo_init(
...
@@ -589,6 +591,9 @@ GIT_EXTERN(int) git_submodule_repo_init(
* submodule config, acting like "git submodule sync". This is useful if
* submodule config, acting like "git submodule sync". This is useful if
* you have altered the URL for the submodule (or it has been altered by a
* you have altered the URL for the submodule (or it has been altered by a
* fetch of upstream changes) and you need to update your local repo.
* fetch of upstream changes) and you need to update your local repo.
*
* @param submodule The submodule to copy.
* @return 0 or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_submodule_sync
(
git_submodule
*
submodule
);
GIT_EXTERN
(
int
)
git_submodule_sync
(
git_submodule
*
submodule
);
...
...
include/git2/tag.h
View file @
258df9c1
...
@@ -362,6 +362,7 @@ GIT_EXTERN(int) git_tag_peel(
...
@@ -362,6 +362,7 @@ GIT_EXTERN(int) git_tag_peel(
*
*
* @param out Pointer to store the copy of the tag
* @param out Pointer to store the copy of the tag
* @param source Original tag to copy
* @param source Original tag to copy
* @return 0
*/
*/
GIT_EXTERN
(
int
)
git_tag_dup
(
git_tag
**
out
,
git_tag
*
source
);
GIT_EXTERN
(
int
)
git_tag_dup
(
git_tag
**
out
,
git_tag
*
source
);
...
...
include/git2/tree.h
View file @
258df9c1
...
@@ -418,6 +418,7 @@ GIT_EXTERN(int) git_tree_walk(
...
@@ -418,6 +418,7 @@ GIT_EXTERN(int) git_tree_walk(
*
*
* @param out Pointer to store the copy of the tree
* @param out Pointer to store the copy of the tree
* @param source Original tree to copy
* @param source Original tree to copy
* @return 0
*/
*/
GIT_EXTERN
(
int
)
git_tree_dup
(
git_tree
**
out
,
git_tree
*
source
);
GIT_EXTERN
(
int
)
git_tree_dup
(
git_tree
**
out
,
git_tree
*
source
);
...
...
include/git2/worktree.h
View file @
258df9c1
...
@@ -52,6 +52,7 @@ GIT_EXTERN(int) git_worktree_lookup(git_worktree **out, git_repository *repo, co
...
@@ -52,6 +52,7 @@ GIT_EXTERN(int) git_worktree_lookup(git_worktree **out, git_repository *repo, co
*
*
* @param out Out-pointer for the newly allocated worktree
* @param out Out-pointer for the newly allocated worktree
* @param repo Repository to look up worktree for
* @param repo Repository to look up worktree for
* @return 0 or an error code
*/
*/
GIT_EXTERN
(
int
)
git_worktree_open_from_repository
(
git_worktree
**
out
,
git_repository
*
repo
);
GIT_EXTERN
(
int
)
git_worktree_open_from_repository
(
git_worktree
**
out
,
git_repository
*
repo
);
...
@@ -237,6 +238,10 @@ GIT_EXTERN(int) git_worktree_prune_options_init(
...
@@ -237,6 +238,10 @@ GIT_EXTERN(int) git_worktree_prune_options_init(
* If the worktree is not valid and not locked or if the above
* If the worktree is not valid and not locked or if the above
* flags have been passed in, this function will return a
* flags have been passed in, this function will return a
* positive value.
* positive value.
*
* @param wt Worktree to check.
* @param opts The prunable options.
* @return 1 if the worktree is prunable, 0 otherwise, or an error code.
*/
*/
GIT_EXTERN
(
int
)
git_worktree_is_prunable
(
git_worktree
*
wt
,
GIT_EXTERN
(
int
)
git_worktree_is_prunable
(
git_worktree
*
wt
,
git_worktree_prune_options
*
opts
);
git_worktree_prune_options
*
opts
);
...
...
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