Doc: Fix broken link
[TortoiseGit.git] / ext / libgit2-0002-core.autocrlf-is-not-correctly-initialized-on-Win32-.patch
blobc8fad67cd80bf1717c5cd637320fdc4cfa723faf
1 From 6e2cf31f8b0c06451b437d2765b25d7d3bd82575 Mon Sep 17 00:00:00 2001
2 From: Sven Strickroth <email@cs-ware.de>
3 Date: Fri, 23 Jan 2015 15:33:36 +0100
4 Subject: [PATCH 2/8] core.autocrlf is not correctly initialized on Win32 if
5 .gitattributes file exists and matches
7 Knowing the proper core.autocrlf value is need for deciding whether the CRLF filter needs to be executed...
9 Signed-off-by: Sven Strickroth <email@cs-ware.de>
10 ---
11 src/crlf.c | 9 ++++-----
12 1 file changed, 4 insertions(+), 5 deletions(-)
14 diff --git a/src/crlf.c b/src/crlf.c
15 index 6e39b0b9f..27ba7eefd 100644
16 --- a/src/crlf.c
17 +++ b/src/crlf.c
18 @@ -289,6 +289,10 @@ static int crlf_check(
19 ca.eol = check_eol(attr_values[1]); /* eol */
21 ca.auto_crlf = GIT_AUTO_CRLF_DEFAULT;
22 + error = git_repository__cvar(
23 + &ca.auto_crlf, git_filter_source_repo(src), GIT_CVAR_AUTO_CRLF);
24 + if (error < 0)
25 + return error;
26 ca.safe_crlf = GIT_SAFE_CRLF_DEFAULT;
29 @@ -304,11 +308,6 @@ static int crlf_check(
30 ((ca.crlf_action == GIT_CRLF_AUTO || ca.crlf_action == GIT_CRLF_TEXT) &&
31 git_filter_source_mode(src) == GIT_FILTER_SMUDGE)) {
33 - error = git_repository__cvar(
34 - &ca.auto_crlf, git_filter_source_repo(src), GIT_CVAR_AUTO_CRLF);
35 - if (error < 0)
36 - return error;
38 if (ca.crlf_action == GIT_CRLF_GUESS &&
39 ca.auto_crlf == GIT_AUTO_CRLF_FALSE)
40 return GIT_PASSTHROUGH;
41 --
42 2.11.0.windows.3