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

Skip to content

Commit 555b351

Browse files
Ryan Roden-Correntcarlosmn
Ryan Roden-Corrent
authored andcommitted
Document git_fetch_options struct and fix typo.
git_fetch_options was missing from the API docs because it lacked a documentation comment above the struct declaration. I used the git_checkout_options docstring as a template. Also fixes a typo in git_remote_prune_refs (remote, not reamote).
1 parent 2563101 commit 555b351

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

include/git2/remote.h

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,14 @@ typedef enum {
511511
GIT_REMOTE_DOWNLOAD_TAGS_ALL,
512512
} git_remote_autotag_option_t;
513513

514+
/**
515+
* Fetch options structure.
516+
*
517+
* Zero out for defaults. Initialize with `GIT_FETCH_OPTIONS_INIT` macro to
518+
* correctly set the `version` field. E.g.
519+
*
520+
* git_fetch_options opts = GIT_FETCH_OPTIONS_INIT;
521+
*/
514522
typedef struct {
515523
int version;
516524

@@ -739,7 +747,7 @@ GIT_EXTERN(int) git_remote_prune_refs(const git_remote *remote);
739747
* stored here for further processing by the caller. Always free this
740748
* strarray on successful return.
741749
* @param repo the repository in which to rename
742-
* @param name the current name of the reamote
750+
* @param name the current name of the remote
743751
* @param new_name the new name the remote should bear
744752
* @return 0, GIT_EINVALIDSPEC, GIT_EEXISTS or an error code
745753
*/

0 commit comments

Comments
 (0)