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>2014-05-20 01:57:09 +0400
committerRussell Belfer <rb@github.com>2014-05-20 01:57:09 +0400
commit16798d08cf3a1757deb9f0363b35fbf775cfc3fb (patch)
treeed97fc03ee350a0b0c9252522632823fe2dccce4 /tests/filter
parent588a43af543f9a00345a6e464a61c51aebad88da (diff)
Make core.safecrlf work on LF-ending platforms
If you enabled core.safecrlf on an LF-ending platform, we would error even for files with all LFs. We should only be warning on irreversible mappings, I think.
Diffstat (limited to 'tests/filter')
-rw-r--r--tests/filter/crlf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/filter/crlf.c b/tests/filter/crlf.c
index 66c267e31..334b1e349 100644
--- a/tests/filter/crlf.c
+++ b/tests/filter/crlf.c
@@ -103,12 +103,12 @@ void test_filter_crlf__with_safecrlf(void)
cl_git_fail(git_filter_list_apply_to_data(&out, fl, &in));
cl_assert_equal_i(giterr_last()->klass, GITERR_FILTER);
- /* Normalized \n fails with safecrlf */
+ /* Normalized \n is reversible, so does not fail with safecrlf */
in.ptr = "Normal\nLF\nonly\nline-endings.\n";
in.size = strlen(in.ptr);
- cl_git_fail(git_filter_list_apply_to_data(&out, fl, &in));
- cl_assert_equal_i(giterr_last()->klass, GITERR_FILTER);
+ cl_git_pass(git_filter_list_apply_to_data(&out, fl, &in));
+ cl_assert_equal_s(in.ptr, out.ptr);
git_filter_list_free(fl);
git_buf_free(&out);