Skip to content

Commit ff78aea

Browse files
authored
Merge pull request libgit2#5860 from libgit2/ethomson/buf_text
buf: remove unnecessary buf_text namespace
2 parents 05548e6 + 14f6950 commit ff78aea

File tree

26 files changed

+468
-539
lines changed

26 files changed

+468
-539
lines changed

src/attr_file.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#include "repository.h"
1111
#include "filebuf.h"
1212
#include "attrcache.h"
13-
#include "buf_text.h"
1413
#include "git2/blob.h"
1514
#include "git2/tree.h"
1615
#include "blob.h"
@@ -123,7 +122,7 @@ int git_attr_file__load(
123122
struct stat st;
124123
bool nonexistent = false;
125124
int bom_offset;
126-
git_bom_t bom;
125+
git_buf_bom_t bom;
127126
git_oid id;
128127
git_object_size_t blobsize;
129128

@@ -192,9 +191,9 @@ int git_attr_file__load(
192191

193192
/* advance over a UTF8 BOM */
194193
content_str = git_buf_cstr(&content);
195-
bom_offset = git_buf_text_detect_bom(&bom, &content);
194+
bom_offset = git_buf_detect_bom(&bom, &content);
196195

197-
if (bom == GIT_BOM_UTF8)
196+
if (bom == GIT_BUF_BOM_UTF8)
198197
content_str += bom_offset;
199198

200199
/* store the key of the attr_reader; don't bother with cache

src/blob.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414

1515
#include "filebuf.h"
1616
#include "filter.h"
17-
#include "buf_text.h"
1817

1918
const void *git_blob_rawcontent(const git_blob *blob)
2019
{
@@ -401,7 +400,7 @@ int git_blob_is_binary(const git_blob *blob)
401400

402401
git_buf_attach_notowned(&content, git_blob_rawcontent(blob),
403402
(size_t)min(size, GIT_FILTER_BYTES_TO_CHECK_NUL));
404-
return git_buf_text_is_binary(&content);
403+
return git_buf_is_binary(&content);
405404
}
406405

407406
int git_blob_filter_options_init(

src/buf_text.c

Lines changed: 0 additions & 316 deletions
This file was deleted.

0 commit comments

Comments
 (0)