Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
1fe56243
Commit
1fe56243
authored
Jun 25, 2014
by
Vicent Marti
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2435 from ethomson/text_attr
Update text=auto / core.autocrlf=false behavior
parents
a252b9e2
d412165f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
3 deletions
+12
-3
CHANGELOG.md
+3
-0
src/crlf.c
+2
-1
tests/checkout/crlf.c
+7
-2
No files found.
CHANGELOG.md
View file @
1fe56243
...
...
@@ -9,3 +9,6 @@ v0.21 + 1
*
Use a map for the treebuilder, making insertion O(1)
*
LF -> CRLF filter refuses to handle mixed-EOL files
*
LF -> CRLF filter now runs when
*
text = auto (with Git for Windows 1.9.4)
src/crlf.c
View file @
1fe56243
...
...
@@ -286,7 +286,8 @@ static int crlf_check(
if
(
error
<
0
)
return
error
;
if
(
ca
.
auto_crlf
==
GIT_AUTO_CRLF_FALSE
)
if
(
ca
.
crlf_action
==
GIT_CRLF_GUESS
&&
ca
.
auto_crlf
==
GIT_AUTO_CRLF_FALSE
)
return
GIT_PASSTHROUGH
;
if
(
ca
.
auto_crlf
==
GIT_AUTO_CRLF_INPUT
&&
...
...
tests/checkout/crlf.c
View file @
1fe56243
...
...
@@ -279,8 +279,13 @@ void test_checkout_crlf__autocrlf_false_text_auto_attr(void)
git_checkout_head
(
g_repo
,
&
opts
);
check_file_contents
(
"./crlf/all-lf"
,
ALL_LF_TEXT_RAW
);
check_file_contents
(
"./crlf/all-crlf"
,
ALL_CRLF_TEXT_RAW
);
if
(
GIT_EOL_NATIVE
==
GIT_EOL_CRLF
)
{
check_file_contents
(
"./crlf/all-lf"
,
ALL_LF_TEXT_AS_CRLF
);
check_file_contents
(
"./crlf/all-crlf"
,
ALL_CRLF_TEXT_AS_CRLF
);
}
else
{
check_file_contents
(
"./crlf/all-lf"
,
ALL_LF_TEXT_RAW
);
check_file_contents
(
"./crlf/all-crlf"
,
ALL_CRLF_TEXT_RAW
);
}
}
void
test_checkout_crlf__autocrlf_true_text_auto_attr
(
void
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment