diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2023-02-16 09:11:57 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2023-02-16 09:11:57 +0000 |
commit | 35580d88a834438275adea77785a5f356352ea21 (patch) | |
tree | cdc1e0bb26593334374b9e6ef9910312250bb3aa /include/git2 | |
parent | fb9515abc80c945dfe74713989dfb4f41d03d106 (diff) | |
download | libgit2-35580d88a834438275adea77785a5f356352ea21.tar.gz |
stash: fixes from code review
Diffstat (limited to 'include/git2')
-rw-r--r-- | include/git2/stash.h | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/include/git2/stash.h b/include/git2/stash.h index 3d70b36c3..dcfc013dc 100644 --- a/include/git2/stash.h +++ b/include/git2/stash.h @@ -57,15 +57,10 @@ typedef enum { * * @param out Object id of the commit containing the stashed state. * This commit is also the target of the direct reference refs/stash. - * * @param repo The owning repository. - * * @param stasher The identity of the person performing the stashing. - * * @param message Optional description along with the stashed state. - * * @param flags Flags to control the stashing process. (see GIT_STASH_* above) - * * @return 0 on success, GIT_ENOTFOUND where there's nothing to stash, * or error code. */ @@ -86,25 +81,21 @@ GIT_EXTERN(int) git_stash_save( typedef struct git_stash_save_options { unsigned int version; + /** Flags to control the stashing process. (see GIT_STASH_* above) */ + uint32_t flags; + /** The identity of the person performing the stashing. */ const git_signature *stasher; /** Optional description along with the stashed state. */ const char *message; - /** Flags to control the stashing process. (see GIT_STASH_* above) */ - uint32_t flags; - /** Optional paths that control which files are stashed. */ git_strarray paths; } git_stash_save_options; #define GIT_STASH_SAVE_OPTIONS_VERSION 1 -#define GIT_STASH_SAVE_OPTIONS_INIT { \ - GIT_STASH_SAVE_OPTIONS_VERSION, \ - NULL, \ - NULL, \ - GIT_STASH_DEFAULT } +#define GIT_STASH_SAVE_OPTIONS_INIT { GIT_STASH_SAVE_OPTIONS_VERSION } /** * Initialize git_stash_save_options structure @@ -121,14 +112,11 @@ GIT_EXTERN(int) git_stash_save_options_init( /** * Save the local modifications to a new stash, with options. - * + * * @param out Object id of the commit containing the stashed state. * This commit is also the target of the direct reference refs/stash. - * * @param repo The owning repository. - * * @param opts The stash options. - * * @return 0 on success, GIT_ENOTFOUND where there's nothing to stash, * or error code. */ |