summaryrefslogtreecommitdiff
path: root/src/blob.c
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-03-25 14:20:07 -0700
committerRussell Belfer <rb@github.com>2013-03-25 14:20:07 -0700
commit3658e81e3499f874dc9f323d4d9127df7e219e12 (patch)
tree468b0ba5739118b56d1961063655ffbbf95d8a12 /src/blob.c
parent050ab9950d089c55e874b63e5ab9c8d0b948cf46 (diff)
downloadlibgit2-3658e81e3499f874dc9f323d4d9127df7e219e12.tar.gz
Move crlf conversion into buf_textautocrlf-fixes
This adds crlf/lf conversion functions into buf_text with more efficient implementations that bypass the high level buffer functions. They attempt to minimize the number of reallocations done and they directly write the buffer data as needed if they know that there is enough memory allocated to memcpy data. Tests are added for these new functions. The crlf.c code is updated to use the new functions. Removed the include of buf_text.h from filter.h and just include it more narrowly in the places that need it.
Diffstat (limited to 'src/blob.c')
-rw-r--r--src/blob.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/blob.c b/src/blob.c
index 3ff141c7f..c0514fc13 100644
--- a/src/blob.c
+++ b/src/blob.c
@@ -12,6 +12,7 @@
#include "common.h"
#include "blob.h"
#include "filter.h"
+#include "buf_text.h"
const void *git_blob_rawcontent(const git_blob *blob)
{