summaryrefslogtreecommitdiff
path: root/src/crlf.c
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2021-05-10 23:04:59 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2021-05-11 01:29:22 +0100
commitd525e063ba4e478cc4afac4cdf60f7acd989dbf2 (patch)
tree40cad165fb5324ae430ebccdf7a1cc7de6687472 /src/crlf.c
parent4bd172087c30e09e7720a7df11cace47ee002256 (diff)
downloadlibgit2-d525e063ba4e478cc4afac4cdf60f7acd989dbf2.tar.gz
buf: remove internal `git_buf_text` namespace
The `git_buf_text` namespace is unnecessary and strange. Remove it, just keep the functions prefixed with `git_buf`.
Diffstat (limited to 'src/crlf.c')
-rw-r--r--src/crlf.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/crlf.c b/src/crlf.c
index 81b5216bc..1de9d8c3b 100644
--- a/src/crlf.c
+++ b/src/crlf.c
@@ -15,7 +15,6 @@
#include "futils.h"
#include "hash.h"
#include "filter.h"
-#include "buf_text.h"
#include "repository.h"
typedef enum {
@@ -219,7 +218,7 @@ static int crlf_apply_to_odb(
if (ca->crlf_action == GIT_CRLF_BINARY || !git_buf_len(from))
return GIT_PASSTHROUGH;
- is_binary = git_buf_text_gather_stats(&stats, from, false);
+ is_binary = git_buf_gather_text_stats(&stats, from, false);
/* Heuristics to see if we can skip the conversion.
* Straight from Core Git.
@@ -247,7 +246,7 @@ static int crlf_apply_to_odb(
return GIT_PASSTHROUGH;
/* Actually drop the carriage returns */
- return git_buf_text_crlf_to_lf(to, from);
+ return git_buf_crlf_to_lf(to, from);
}
static int crlf_apply_to_workdir(
@@ -262,7 +261,7 @@ static int crlf_apply_to_workdir(
if (git_buf_len(from) == 0 || output_eol(ca) != GIT_EOL_CRLF)
return GIT_PASSTHROUGH;
- is_binary = git_buf_text_gather_stats(&stats, from, false);
+ is_binary = git_buf_gather_text_stats(&stats, from, false);
/* If there are no LFs, or all LFs are part of a CRLF, nothing to do */
if (stats.lf == 0 || stats.lf == stats.crlf)
@@ -281,7 +280,7 @@ static int crlf_apply_to_workdir(
return GIT_PASSTHROUGH;
}
- return git_buf_text_lf_to_crlf(to, from);
+ return git_buf_lf_to_crlf(to, from);
}
static int convert_attrs(