Commit 1d8ec670 by Ben Straub

API updates for stash.h

parent ff6b5ac9
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
GIT_BEGIN_DECL GIT_BEGIN_DECL
enum { typedef enum {
GIT_STASH_DEFAULT = 0, GIT_STASH_DEFAULT = 0,
/* All changes already added to the index /* All changes already added to the index
...@@ -35,7 +35,7 @@ enum { ...@@ -35,7 +35,7 @@ enum {
* cleaned up from the working directory * cleaned up from the working directory
*/ */
GIT_STASH_INCLUDE_IGNORED = (1 << 2), GIT_STASH_INCLUDE_IGNORED = (1 << 2),
}; } git_stash_flags;
/** /**
* Save the local modifications to a new stash. * Save the local modifications to a new stash.
...@@ -49,18 +49,17 @@ enum { ...@@ -49,18 +49,17 @@ enum {
* *
* @param message Optional description along with the stashed state. * @param message Optional description along with the stashed state.
* *
* @param flags Flags to control the stashing process. * @param flags Flags to control the stashing process. (see GIT_STASH_* above)
* *
* @return 0 on success, GIT_ENOTFOUND where there's nothing to stash, * @return 0 on success, GIT_ENOTFOUND where there's nothing to stash,
* or error code. * or error code.
*/ */
GIT_EXTERN(int) git_stash_save( GIT_EXTERN(int) git_stash_save(
git_oid *out, git_oid *out,
git_repository *repo, git_repository *repo,
git_signature *stasher, git_signature *stasher,
const char *message, const char *message,
uint32_t flags); unsigned int flags);
/** /**
* When iterating over all the stashed states, callback that will be * When iterating over all the stashed states, callback that will be
...@@ -71,16 +70,16 @@ GIT_EXTERN(int) git_stash_save( ...@@ -71,16 +70,16 @@ GIT_EXTERN(int) git_stash_save(
* *
* @param message The stash message. * @param message The stash message.
* *
* @param stash_oid The commit oid of the stashed state. * @param stash_id The commit oid of the stashed state.
* *
* @param payload Extra parameter to callback function. * @param payload Extra parameter to callback function.
* *
* @return 0 on success, GIT_EUSER on non-zero callback, or error code * @return 0 on success, GIT_EUSER on non-zero callback, or error code
*/ */
typedef int (*stash_cb)( typedef int (*git_stash_cb)(
size_t index, size_t index,
const char* message, const char* message,
const git_oid *stash_oid, const git_oid *stash_id,
void *payload); void *payload);
/** /**
...@@ -99,7 +98,7 @@ typedef int (*stash_cb)( ...@@ -99,7 +98,7 @@ typedef int (*stash_cb)(
*/ */
GIT_EXTERN(int) git_stash_foreach( GIT_EXTERN(int) git_stash_foreach(
git_repository *repo, git_repository *repo,
stash_cb callback, git_stash_cb callback,
void *payload); void *payload);
/** /**
......
...@@ -579,7 +579,7 @@ cleanup: ...@@ -579,7 +579,7 @@ cleanup:
int git_stash_foreach( int git_stash_foreach(
git_repository *repo, git_repository *repo,
stash_cb callback, git_stash_cb callback,
void *payload) void *payload)
{ {
git_reference *stash; git_reference *stash;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment