diff options
author | Russell Belfer <rb@github.com> | 2012-09-21 10:51:42 -0700 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2012-09-21 10:51:42 -0700 |
commit | 0cb24616eea3b92893b2a03e851a0db2c04862ef (patch) | |
tree | f62f1028b6611a78fd930319aca0045978e5fd1d /include/git2 | |
parent | 73f6da66afae81a806a1596afe55cab058e3df32 (diff) | |
parent | 9e592583fc5fcd7eec5d40d30e34870e6a029fef (diff) | |
download | libgit2-0cb24616eea3b92893b2a03e851a0db2c04862ef.tar.gz |
Merge pull request #942 from nulltoken/topic/checkout-notify-skipped
checkout: add notification callback for skipped files
Diffstat (limited to 'include/git2')
-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 */ |