Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRussell Belfer <rb@github.com>2013-09-24 21:11:20 +0400
committerRussell Belfer <rb@github.com>2013-09-24 21:11:20 +0400
commit634f10f69090b325a50c8bca6cb303397576305e (patch)
tree7728cd252fd6377749b593654d88d89270a66a73 /src/crlf.c
parenta3c2d916d8ad67196d2211b0a88dcbab7a433764 (diff)
Fix incorrect return code in crlf filter
The git_buf_text_gather_stats call returns a boolean indicating if the file looks like binary data. That shouldn't be an error; it should be used to skip CRLF processing though.
Diffstat (limited to 'src/crlf.c')
-rw-r--r--src/crlf.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/crlf.c b/src/crlf.c
index b4eda267b..b25c02cce 100644
--- a/src/crlf.c
+++ b/src/crlf.c
@@ -133,9 +133,9 @@ static int crlf_apply_to_odb(
if (ca->crlf_action == GIT_CRLF_AUTO || ca->crlf_action == GIT_CRLF_GUESS) {
git_buf_text_stats stats;
- /* Check heuristics for binary vs text... */
+ /* Check heuristics for binary vs text - returns true if binary */
if (git_buf_text_gather_stats(&stats, from, false))
- return -1;
+ return GIT_PASSTHROUGH;
/*
* We're currently not going to even try to convert stuff