Show the 'normal' overlay if not even the 'modified' overlay is available
[TortoiseGit.git] / ext / libgit2-0002-core.autocrlf-is-not-correctly-initialized-on-Win32-.patch
blobe31bcb25cb0931e73b4efe62ad6e4899462d53cb
1 From 8ae26c725a1cd57dd8f577b670ecaeed66ac357f 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/6] 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 3a3c937..1290c01 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;
28 * Use the core Git logic to see if we should perform CRLF for this file
29 @@ -303,11 +307,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.4.4.windows.2