filebuf: add git_filebuf_flush()
diff --git a/src/filebuf.c b/src/filebuf.c
index 6538aea..876f8e3 100644
--- a/src/filebuf.c
+++ b/src/filebuf.c
@@ -130,6 +130,11 @@ GIT_INLINE(int) flush_buffer(git_filebuf *file)
return result;
}
+int git_filebuf_flush(git_filebuf *file)
+{
+ return flush_buffer(file);
+}
+
static int write_normal(git_filebuf *file, void *source, size_t len)
{
if (len > 0) {
diff --git a/src/filebuf.h b/src/filebuf.h
index 72563b5..3778831 100644
--- a/src/filebuf.h
+++ b/src/filebuf.h
@@ -81,5 +81,6 @@ int git_filebuf_commit(git_filebuf *lock, mode_t mode);
int git_filebuf_commit_at(git_filebuf *lock, const char *path, mode_t mode);
void git_filebuf_cleanup(git_filebuf *lock);
int git_filebuf_hash(git_oid *oid, git_filebuf *file);
+int git_filebuf_flush(git_filebuf *file);
#endif