summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-06-15 00:11:25 +0100
committerGitHub <noreply@github.com>2021-06-15 00:11:25 +0100
commit9ecbff125a5d042c9120ed9002d3dc1376c670ed (patch)
treeace9e4ccf937d508831374f54fc7cf5d4adaf448
parent868f4bcb4d3290f4b5320f030fccdf1e7fc8ac8a (diff)
parenta2fa9a57728dddd1f69d9821d09f20c8305a1d92 (diff)
downloadlibgit2-9ecbff125a5d042c9120ed9002d3dc1376c670ed.tar.gz
Merge pull request #5903 from punkymaniac/patch-documentation
Patch documentation
-rw-r--r--include/git2/apply.h2
-rw-r--r--include/git2/common.h5
-rw-r--r--include/git2/indexer.h3
-rw-r--r--include/git2/tree.h2
4 files changed, 11 insertions, 1 deletions
diff --git a/include/git2/apply.h b/include/git2/apply.h
index b248eaafe..bc637df1c 100644
--- a/include/git2/apply.h
+++ b/include/git2/apply.h
@@ -100,6 +100,7 @@ GIT_EXTERN(int) git_apply_options_init(git_apply_options *opts, unsigned int ver
* @param preimage the tree to apply the diff to
* @param diff the diff to apply
* @param options the options for the apply (or null for defaults)
+ * @return 0 or an error code
*/
GIT_EXTERN(int) git_apply_to_tree(
git_index **out,
@@ -137,6 +138,7 @@ typedef enum {
* @param diff the diff to apply
* @param location the location to apply (workdir, index or both)
* @param options the options for the apply (or null for defaults)
+ * @return 0 or an error code
*/
GIT_EXTERN(int) git_apply(
git_repository *repo,
diff --git a/include/git2/common.h b/include/git2/common.h
index 8dd30d506..dee260e05 100644
--- a/include/git2/common.h
+++ b/include/git2/common.h
@@ -356,6 +356,11 @@ typedef enum {
* >
* > - `ciphers` is the list of ciphers that are eanbled.
*
+ * * opts(GIT_OPT_GET_USER_AGENT, git_buf *out)
+ *
+ * > Get the value of the User-Agent header.
+ * > The User-Agent is written to the `out` buffer.
+ *
* * opts(GIT_OPT_ENABLE_OFS_DELTA, int enabled)
*
* > Enable or disable the use of "offset deltas" when creating packfiles,
diff --git a/include/git2/indexer.h b/include/git2/indexer.h
index 8059e4db3..a434d243f 100644
--- a/include/git2/indexer.h
+++ b/include/git2/indexer.h
@@ -51,7 +51,7 @@ typedef struct git_indexer_progress {
* Type for progress callbacks during indexing. Return a value less
* than zero to cancel the indexing or download.
*
- * @param stats Structure containing information about the state of the tran sfer
+ * @param stats Structure containing information about the state of the transfer
* @param payload Payload provided by caller
*/
typedef int GIT_CALLBACK(git_indexer_progress_cb)(const git_indexer_progress *stats, void *payload);
@@ -64,6 +64,7 @@ typedef struct git_indexer_options {
/** progress_cb function to call with progress information */
git_indexer_progress_cb progress_cb;
+
/** progress_cb_payload payload for the progress callback */
void *progress_cb_payload;
diff --git a/include/git2/tree.h b/include/git2/tree.h
index d7545ace9..f2289fc7e 100644
--- a/include/git2/tree.h
+++ b/include/git2/tree.h
@@ -334,6 +334,7 @@ GIT_EXTERN(int) git_treebuilder_insert(
*
* @param bld Tree builder
* @param filename Filename of the entry to remove
+ * @return 0 or an error code
*/
GIT_EXTERN(int) git_treebuilder_remove(
git_treebuilder *bld, const char *filename);
@@ -463,6 +464,7 @@ typedef struct {
* @param baseline the tree to base these changes on
* @param nupdates the number of elements in the update list
* @param updates the list of updates to perform
+ * @return 0 or an error code
*/
GIT_EXTERN(int) git_tree_create_updated(git_oid *out, git_repository *repo, git_tree *baseline, size_t nupdates, const git_tree_update *updates);