Commit 66b2626c by Edward Thomson

core.autocrlf=input w/ text=auto attr to workdir

parent 9780020b
...@@ -269,7 +269,9 @@ static int crlf_check( ...@@ -269,7 +269,9 @@ static int crlf_check(
if (ca.crlf_action == GIT_CRLF_BINARY) if (ca.crlf_action == GIT_CRLF_BINARY)
return GIT_PASSTHROUGH; return GIT_PASSTHROUGH;
if (ca.crlf_action == GIT_CRLF_GUESS) { if (ca.crlf_action == GIT_CRLF_GUESS ||
(ca.crlf_action == GIT_CRLF_AUTO &&
git_filter_source_mode(src) == GIT_FILTER_SMUDGE)) {
error = git_repository__cvar( error = git_repository__cvar(
&ca.auto_crlf, git_filter_source_repo(src), GIT_CVAR_AUTO_CRLF); &ca.auto_crlf, git_filter_source_repo(src), GIT_CVAR_AUTO_CRLF);
if (error < 0) if (error < 0)
...@@ -277,6 +279,10 @@ static int crlf_check( ...@@ -277,6 +279,10 @@ static int crlf_check(
if (ca.auto_crlf == GIT_AUTO_CRLF_FALSE) if (ca.auto_crlf == GIT_AUTO_CRLF_FALSE)
return GIT_PASSTHROUGH; return GIT_PASSTHROUGH;
if (ca.auto_crlf == GIT_AUTO_CRLF_INPUT &&
git_filter_source_mode(src) == GIT_FILTER_SMUDGE)
return GIT_PASSTHROUGH;
} }
*payload = git__malloc(sizeof(ca)); *payload = git__malloc(sizeof(ca));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment