diff options
Diffstat (limited to 'include/git2/common.h')
-rw-r--r-- | include/git2/common.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/include/git2/common.h b/include/git2/common.h index fc820cae7..8c9347413 100644 --- a/include/git2/common.h +++ b/include/git2/common.h @@ -194,7 +194,8 @@ typedef enum { GIT_OPT_GET_WINDOWS_SHAREMODE, GIT_OPT_SET_WINDOWS_SHAREMODE, GIT_OPT_ENABLE_STRICT_HASH_VERIFICATION, - GIT_OPT_SET_ALLOCATOR + GIT_OPT_SET_ALLOCATOR, + GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY } git_libgit2_opt_t; /** @@ -363,6 +364,14 @@ typedef enum { * > allocator will then be used to make all memory allocations for * > libgit2 operations. * + * opts(GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, int enabled) + * + * > Ensure that there are no unsaved changes in the index before + * > beginning any operation that reloads the index from disk (eg, + * > checkout). If there are unsaved changes, the instruction will + * > fail. (Using the FORCE flag to checkout will still overwrite + * > these changes.) + * * @param option Option key * @param ... value to set the option * @return 0 on success, <0 on failure |