Provide (experimental) clang-format file
[TortoiseGit.git] / ext / libgit2-0001-core.autocrlf-true-and-core.safecrlf-true-did-not-fa.patch
blob123d57ad5d9988e4c6befae29927e8ca4d61669e
1 From b39680cc8fb4a52058d2e8ba8e9d349eb6014c1e Mon Sep 17 00:00:00 2001
2 From: Sven Strickroth <email@cs-ware.de>
3 Date: Fri, 23 Jan 2015 14:16:34 +0100
4 Subject: [PATCH 1/7] core.autocrlf=true and core.safecrlf=true did not fail on
5 LF-only file as vanilla git does
7 Reported-by: Yue Lin Ho <b8732003@student.nsysu.edu.tw>
8 Signed-off-by: Sven Strickroth <email@cs-ware.de>
9 ---
10 src/crlf.c | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
13 diff --git a/src/crlf.c b/src/crlf.c
14 index 96cd2d807..62b4d6a38 100644
15 --- a/src/crlf.c
16 +++ b/src/crlf.c
17 @@ -142,8 +142,8 @@ static int crlf_apply_to_odb(
18 if (git_buf_text_gather_stats(&stats, from, false))
19 return GIT_PASSTHROUGH;
21 - /* If there are no CR characters to filter out, then just pass */
22 - if (!stats.cr)
23 + /* If there are no CR characters to filter out and CrLf is not set to "true", then just pass */
24 + if (!stats.cr && ca->auto_crlf != GIT_AUTO_CRLF_TRUE)
25 return GIT_PASSTHROUGH;
27 /* If safecrlf is enabled, sanity-check the result. */
28 --
29 2.16.1.windows.4