vendor/libgit2/include/git2/stash.h in rugged-0.27.10 vs vendor/libgit2/include/git2/stash.h in rugged-0.27.10.1
- old
+ new
@@ -7,11 +7,10 @@
#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
@@ -79,11 +78,10 @@
* 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,
@@ -110,26 +108,26 @@
/**
* Stash application progress notification function.
* Return 0 to continue processing, or a negative value to
* abort the stash application.
*/
-typedef int GIT_CALLBACK(git_stash_apply_progress_cb)(
+typedef int (*git_stash_apply_progress_cb)(
git_stash_apply_progress_t progress,
void *payload);
-/**
- * Stash application options structure
+/** Stash application options structure.
*
- * Initialize with `GIT_STASH_APPLY_OPTIONS_INIT`. Alternatively, you can
- * use `git_stash_apply_options_init`.
+ * Initialize with the `GIT_STASH_APPLY_OPTIONS_INIT` macro to set
+ * sensible defaults; for example:
*
+ * 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. */
- uint32_t flags;
+ git_stash_apply_flags flags;
/** Options to use when writing files to the working directory. */
git_checkout_options checkout_options;
/** Optional callback to notify the consumer of application progress. */
@@ -142,20 +140,19 @@
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` struct to initialize.
- * @param version The struct version; pass `GIT_STASH_APPLY_OPTIONS_VERSION`.
+ * @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.
* @return Zero on success; -1 on failure.
*/
-GIT_EXTERN(int) git_stash_apply_options_init(
+GIT_EXTERN(int) git_stash_apply_init_options(
git_stash_apply_options *opts, unsigned int version);
/**
* Apply a single stashed state from the stash list.
*
@@ -196,10 +193,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_CALLBACK(git_stash_cb)(
+typedef int (*git_stash_cb)(
size_t index,
const char* message,
const git_oid *stash_id,
void *payload);