summaryrefslogtreecommitdiff
path: root/convert.h
diff options
context:
space:
mode:
authorTorsten Bögershausen <tboegi@web.de>2016-06-28 08:01:13 (GMT)
committerJunio C Hamano <gitster@pobox.com>2016-07-06 18:53:51 (GMT)
commit6523728499e77afaed0008875b19b308682c3f88 (patch)
tree7b132c36c7f8b51ea7e1e7a85d7995617712f504 /convert.h
parentcaa47adc5a68045bfb9e88fcfee0e50589d129df (diff)
downloadgit-6523728499e77afaed0008875b19b308682c3f88.zip
git-6523728499e77afaed0008875b19b308682c3f88.tar.gz
git-6523728499e77afaed0008875b19b308682c3f88.tar.bz2
convert: unify the "auto" handling of CRLF
Before this change, $ echo "* text=auto" >.gitattributes $ echo "* eol=crlf" >>.gitattributes would have the same effect as $ echo "* text" >.gitattributes $ git config core.eol crlf Since the 'eol' attribute had higher priority than 'text=auto', this may corrupt binary files and is not what most users expect to happen. Make the 'eol' attribute to obey 'text=auto' and now $ echo "* text=auto" >.gitattributes $ echo "* eol=crlf" >>.gitattributes behaves the same as $ echo "* text=auto" >.gitattributes $ git config core.eol crlf In other words, $ echo "* text=auto eol=crlf" >.gitattributes has the same effect as $ git config core.autocrlf true and $ echo "* text=auto eol=lf" >.gitattributes has the same effect as $ git config core.autocrlf input Signed-off-by: Torsten Bögershausen <tboegi@web.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
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 ccf436b..82871a1 100644
--- a/convert.h
+++ b/convert.h
@@ -7,7 +7,8 @@
enum safe_crlf {
SAFE_CRLF_FALSE = 0,
SAFE_CRLF_FAIL = 1,
- SAFE_CRLF_WARN = 2
+ SAFE_CRLF_WARN = 2,
+ SAFE_CRLF_RENORMALIZE = 3
};
extern enum safe_crlf safe_crlf;