vendor/libgit2/include/git2/stash.h in rugged-0.27.10.1 vs vendor/libgit2/include/git2/stash.h in rugged-0.28.0

- old
+ new

@@ -7,10 +7,11 @@ #ifndef INCLUDE_git_stash_h__ #define INCLUDE_git_stash_h__ #include "common.h" #include "types.h" +#include "checkout.h" /** * @file git2/stash.h * @brief Git stash management routines * @ingroup Git @@ -78,10 +79,11 @@ * but also the index's changes. */ GIT_STASH_APPLY_REINSTATE_INDEX = (1 << 0), } git_stash_apply_flags; +/** Stash apply progression states */ typedef enum { GIT_STASH_APPLY_PROGRESS_NONE = 0, /** Loading the stashed data from the object database. */ GIT_STASH_APPLY_PROGRESS_LOADING_STASH, @@ -108,20 +110,20 @@ /** * Stash application progress notification function. * Return 0 to continue processing, or a negative value to * abort the stash application. */ -typedef int (*git_stash_apply_progress_cb)( +typedef int GIT_CALLBACK(git_stash_apply_progress_cb)( git_stash_apply_progress_t progress, void *payload); -/** Stash application options structure. +/** + * Stash application options structure * - * Initialize with the `GIT_STASH_APPLY_OPTIONS_INIT` macro to set - * sensible defaults; for example: + * Initialize with `GIT_STASH_APPLY_OPTIONS_INIT`. Alternatively, you can + * use `git_stash_apply_init_options`. * - * git_stash_apply_options opts = GIT_STASH_APPLY_OPTIONS_INIT; */ typedef struct git_stash_apply_options { unsigned int version; /** See `git_stash_apply_flags_t`, above. */ @@ -140,16 +142,17 @@ GIT_STASH_APPLY_OPTIONS_VERSION, \ GIT_STASH_APPLY_DEFAULT, \ GIT_CHECKOUT_OPTIONS_INIT } /** + * Initialize git_stash_apply_options structure + * * Initializes a `git_stash_apply_options` with default values. Equivalent to - * creating an instance with GIT_STASH_APPLY_OPTIONS_INIT. + * creating an instance with `GIT_STASH_APPLY_OPTIONS_INIT`. * - * @param opts the `git_stash_apply_options` instance to initialize. - * @param version the version of the struct; you should pass - * `GIT_STASH_APPLY_OPTIONS_INIT` here. + * @param opts The `git_stash_apply_options` struct to initialize. + * @param version The struct version; pass `GIT_STASH_APPLY_OPTIONS_VERSION`. * @return Zero on success; -1 on failure. */ GIT_EXTERN(int) git_stash_apply_init_options( git_stash_apply_options *opts, unsigned int version); @@ -193,10 +196,10 @@ * @param message The stash message. * @param stash_id The commit oid of the stashed state. * @param payload Extra parameter to callback function. * @return 0 to continue iterating or non-zero to stop. */ -typedef int (*git_stash_cb)( +typedef int GIT_CALLBACK(git_stash_cb)( size_t index, const char* message, const git_oid *stash_id, void *payload);