summaryrefslogtreecommitdiff
path: root/convert.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2017-08-27 05:55:05 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-08-27 05:55:05 (GMT)
commita17483fcfe313e9ff5b9b0eb8245605fe7f66ea7 (patch)
treeb90b9eaa13cdcf37d65b8dde1fd715603ece0118 /convert.h
parentf6a47f9b7aa5ad472495c475d61f8a4b97f7b6b6 (diff)
parentc24f3abaceabb590125751a67ec0e32946780ac7 (diff)
downloadgit-a17483fcfe313e9ff5b9b0eb8245605fe7f66ea7.zip
git-a17483fcfe313e9ff5b9b0eb8245605fe7f66ea7.tar.gz
git-a17483fcfe313e9ff5b9b0eb8245605fe7f66ea7.tar.bz2
Merge branch 'tb/apply-with-crlf'
"git apply" that is used as a better "patch -p1" failed to apply a taken from a file with CRLF line endings to a file with CRLF line endings. The root cause was because it misused convert_to_git() that tried to do "safe-crlf" processing by looking at the index entry at the same path, which is a nonsense---in that mode, "apply" is not working on the data in (or derived from) the index at all. This has been fixed. * tb/apply-with-crlf: apply: file commited with CRLF should roundtrip diff and apply convert: add SAFE_CRLF_KEEP_CRLF
Diffstat (limited to 'convert.h')
-rw-r--r--convert.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/convert.h b/convert.h
index 6b06144..4f2da22 100644
--- a/convert.h
+++ b/convert.h
@@ -12,7 +12,8 @@ enum safe_crlf {
SAFE_CRLF_FALSE = 0,
SAFE_CRLF_FAIL = 1,
SAFE_CRLF_WARN = 2,
- SAFE_CRLF_RENORMALIZE = 3
+ SAFE_CRLF_RENORMALIZE = 3,
+ SAFE_CRLF_KEEP_CRLF = 4
};
extern enum safe_crlf safe_crlf;