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
b033f3a3
Commit
b033f3a3
authored
Feb 11, 2014
by
Edward Thomson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Never convert CRLF->LF
Core git performs no conversion on systems that use LF, emulate that.
parent
5d195cf7
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
17 deletions
+4
-17
src/crlf.c
+4
-17
No files found.
src/crlf.c
View file @
b033f3a3
...
@@ -218,24 +218,11 @@ static int crlf_apply_to_workdir(
...
@@ -218,24 +218,11 @@ static int crlf_apply_to_workdir(
if
(
!
workdir_ending
)
if
(
!
workdir_ending
)
return
-
1
;
return
-
1
;
if
(
!
strcmp
(
"
\n
"
,
workdir_ending
))
{
/* only LF->CRLF conversion is supported, do nothing on LF platforms */
if
(
ca
->
crlf_action
==
GIT_CRLF_GUESS
&&
ca
->
auto_crlf
)
if
(
strcmp
(
workdir_ending
,
"
\r\n
"
)
!=
0
)
return
GIT_PASSTHROUGH
;
return
GIT_PASSTHROUGH
;
if
(
git_buf_find
(
from
,
'\r'
)
<
0
)
return
GIT_PASSTHROUGH
;
if
(
git_buf_text_crlf_to_lf
(
to
,
from
)
<
0
)
return
-
1
;
}
else
{
/* only other supported option is lf->crlf conversion */
assert
(
!
strcmp
(
"
\r\n
"
,
workdir_ending
));
if
(
git_buf_text_lf_to_crlf
(
to
,
from
)
<
0
)
return
-
1
;
}
return
0
;
return
git_buf_text_lf_to_crlf
(
to
,
from
)
;
}
}
static
int
crlf_check
(
static
int
crlf_check
(
...
...
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