summaryrefslogtreecommitdiff
path: root/include/git2/sys/diff.h
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2014-12-30 13:47:11 -0800
committerRussell Belfer <rb@github.com>2014-12-30 13:47:11 -0800
commitf747083efa10abdc1f4a1cbe17efbb05fa8b2da8 (patch)
tree2f54da0d23402cbfb755dbcf9156fb77ee134f9c /include/git2/sys/diff.h
parenta3ef70bb405a05c16fb533d828da2510ff751224 (diff)
downloadlibgit2-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.h12
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