diff options
author | nulltoken <emeric.fermas@gmail.com> | 2012-09-19 12:23:47 +0200 |
---|---|---|
committer | nulltoken <emeric.fermas@gmail.com> | 2012-09-21 08:08:29 +0200 |
commit | 9e592583fc5fcd7eec5d40d30e34870e6a029fef (patch) | |
tree | 95e945f90700bfe7bad7739067cd7ff9e0fdc7e4 /include/git2/checkout.h | |
parent | 9ac8b113b18e04d4d6f0573e3a6c5e06c447dbf3 (diff) | |
download | libgit2-9e592583fc5fcd7eec5d40d30e34870e6a029fef.tar.gz |
checkout: add notification callback for skipped files
Diffstat (limited to 'include/git2/checkout.h')
-rw-r--r-- | include/git2/checkout.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/git2/checkout.h b/include/git2/checkout.h index 42d47003d..ef3badbe9 100644 --- a/include/git2/checkout.h +++ b/include/git2/checkout.h @@ -36,6 +36,21 @@ typedef struct git_checkout_opts { int file_mode; /* default is 0644 */ int file_open_flags; /* default is O_CREAT | O_TRUNC | O_WRONLY */ + /* Optional callback to notify the consumer of files that + * haven't be checked out because a modified version of them + * exist in the working directory. + * + * When provided, this callback will be invoked when the flag + * GIT_CHECKOUT_OVERWRITE_MODIFIED isn't part of the checkout strategy. + */ + int (* skipped_notify_cb)( + const char *skipped_file, + const git_oid *blob_oid, + int file_mode, + void *payload); + + void *notify_payload; + /* when not NULL, arrays of fnmatch pattern specifying * which paths should be taken into account */ |