diff options
author | Russell Belfer <rb@github.com> | 2014-12-30 13:47:11 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-12-30 13:47:11 -0800 |
commit | f747083efa10abdc1f4a1cbe17efbb05fa8b2da8 (patch) | |
tree | 2f54da0d23402cbfb755dbcf9156fb77ee134f9c /include/git2/sys/diff.h | |
parent | a3ef70bb405a05c16fb533d828da2510ff751224 (diff) | |
download | libgit2-rb/test-builtin-drivers.tar.gz |
Add API to precompile all diff driversrb/test-builtin-drivers
Diffstat (limited to 'include/git2/sys/diff.h')
-rw-r--r-- | include/git2/sys/diff.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/git2/sys/diff.h b/include/git2/sys/diff.h index 034d5c478..f54bd2e77 100644 --- a/include/git2/sys/diff.h +++ b/include/git2/sys/diff.h @@ -89,6 +89,18 @@ GIT_EXTERN(int) git_diff_get_perfdata( GIT_EXTERN(int) git_status_list_get_perfdata( git_diff_perfdata *out, const git_status_list *status); +/** + * Compile all builtin diff drivers. + * + * Normally builtin diff drivers are only compiled on-demand when they are + * used. This function loops through the internal table and compiles and + * caches all of the builtin diff drivers. This can be done for testing + * purposes or to control when the driver compilation costs are paid. + * + * @return 0 for success, <0 for error + */ +GIT_EXTERN(int) git_diff_driver_compile_builtins(git_repository *repo); + /** @} */ GIT_END_DECL #endif |