{"thread":{"id":"24011","subject":"[PATCH v6] Add \"core.eol\" config variable","startedAt":"2010-06-04T19:29:08Z","lastAt":"2013-08-13T18:03:49Z","messageCount":14,"participants":["Eyvind Bernhardsen","Jonathan Nieder","Junio C Hamano","Ramsay Jones","Mr_and_Mrs_D","Brice Lambson","Erik Faye-Lund","Johannes Sixt","Tvangeste"],"isPatch":true,"patchVersion":6,"patchTotal":null},"messages":[{"id":"143000","messageId":"1275679748-7214-1-git-send-email-eyvind.bernhardsen@gmail.com","threadId":"24011","inReplyTo":null,"subject":"[PATCH v6] Add \"core.eol\" config variable","fromName":"Eyvind Bernhardsen","fromEmail":"eyvind.bernhardsen@gmail.com","sentAt":"2010-06-04T19:29:08Z","receivedAt":"2010-06-04T19:29:08Z","isPatch":true,"sender":{"key":"eyvind.bernhardsen@gmail.com","avatar":"https://avatars.githubusercontent.com/u/106762?v=4"},"body":"Introduce a new configuration variable, \"core.eol\", that allows the user\nto set which line endings to use for end-of-line-normalized files in the\nworking directory.  It defaults to \"native\", which means CRLF on Windows\nand LF everywhere else.\n\nNote that \"core.autocrlf\" overrides core.eol.  This means that\n\n[core]\n\tautocrlf = true\n\nputs CRLFs in the working directory even if core.eol is set to \"lf\".\n\nSigned-off-by: Eyvind Bernhardsen <eyvind.bernhardsen@gmail.com>\n---\nAs Clemens Buchacher noted, \"core.autocrlf\" doesn't work as a generic\n\"turn on automatic line ending normalization\" setting since it doesn't\nalways normalize line endings.\n\nThis is a replacement for the 'Add \"core.eol\" config variable' commit\nthat's currently in pu (the last one in my series).  Instead of implying\nthat \"core.autocrlf=true\" is a replacement for \"* text=auto\", it makes\nexplicit the fact that autocrlf is only for users who want to work with\nCRLFs in their working directory on a repository that doesn't have text\nfile normalization.  When it is enabled, \"core.eol\" is ignored.\n-- \nEyvind\n\n Documentation/config.txt        |   35 ++++++++++-------\n Documentation/gitattributes.txt |   28 +++++++------\n Makefile                        |    3 +\n cache.h                         |   13 ++++++\n config.c                        |   16 +++++++\n convert.c                       |   60 +++++++++++++++++-----------\n environment.c                   |    1 +\n t/t0026-eol-config.sh           |   83 +++++++++++++++++++++++++++++++++++++++\n 8 files changed, 188 insertions(+), 51 deletions(-)\n create mode 100755 t/t0026-eol-config.sh\n\ndiff --git a/Documentation/config.txt b/Documentation/config.txt\nindex 207351b..5a0737a 100644\n--- a/Documentation/config.txt\n+++ b/Documentation/config.txt\n@@ -196,16 +196,13 @@ core.quotepath::\n \tquoted without `-z` regardless of the setting of this\n \tvariable.\n \n-core.autocrlf::\n-\tIf true, makes git convert `CRLF` at the end of lines in text files to\n-\t`LF` when reading from the work tree, and convert in reverse when\n-\twriting to the work tree.  The variable can be set to\n-\t'input', in which case the conversion happens only while\n-\treading from the work tree but files are written out to the work\n-\ttree with `LF` at the end of lines.  A file is considered\n-\t\"text\" (i.e. be subjected to the autocrlf mechanism) based on\n-\tthe file's `text` attribute, or if `text` is unspecified,\n-\tbased on the file's contents.  See linkgit:gitattributes[5].\n+core.eol::\n+\tSets the line ending type to use in the working directory for\n+\tfiles that have the `text` property set.  Alternatives are\n+\t'lf', 'crlf' and 'native', which uses the platform's native\n+\tline ending.  The default value is `native`.  See\n+\tlinkgit:gitattributes[5] for more information on end-of-line\n+\tconversion.\n \n core.safecrlf::\n \tIf true, makes git check if converting `CRLF` is reversible when\n@@ -219,7 +216,7 @@ core.safecrlf::\n \tirreversible conversion but continue the operation.\n +\n CRLF conversion bears a slight chance of corrupting data.\n-autocrlf=true will convert CRLF to LF during commit and LF to\n+When it is enabled, git will convert CRLF to LF during commit and LF to\n CRLF during checkout.  A file that contains a mixture of LF and\n CRLF before the commit cannot be recreated by git.  For text\n files this is the right thing to do: it corrects line endings\n@@ -243,15 +240,25 @@ converting CRLFs corrupts data.\n +\n Note, this safety check does not mean that a checkout will generate a\n file identical to the original file for a different setting of\n-`core.autocrlf`, but only for the current one.  For example, a text\n-file with `LF` would be accepted with `core.autocrlf=input` and could\n-later be checked out with `core.autocrlf=true`, in which case the\n+`core.eol` and `core.autocrlf`, but only for the current one.  For\n+example, a text file with `LF` would be accepted with `core.eol=lf`\n+and could later be checked out with `core.eol=crlf`, in which case the\n resulting file would contain `CRLF`, although the original file\n contained `LF`.  However, in both work trees the line endings would be\n consistent, that is either all `LF` or all `CRLF`, but never mixed.  A\n file with mixed line endings would be reported by the `core.safecrlf`\n mechanism.\n \n+core.autocrlf::\n+\tSetting this variable to \"true\" is almost the same as setting\n+\tthe `text` attribute to \"auto\" on all files except that text\n+\tfiles are not guaranteed to be normalized: files that contain\n+\t`CRLF` in the repository will not be touched.  Use this\n+\tsetting if you want to have `CRLF` line endings in your\n+\tworking directory even though the repository does not have\n+\tnormalized line endings.  This variable can be set to 'input',\n+\tin which case no output conversion is performed.\n+\n core.symlinks::\n \tIf false, symbolic links are checked out as small plain files that\n \tcontain the link text. linkgit:git-update-index[1] and\ndiff --git a/Documentation/gitattributes.txt b/Documentation/gitattributes.txt\nindex f091f08..fce203d 100644\n--- a/Documentation/gitattributes.txt\n+++ b/Documentation/gitattributes.txt\n@@ -99,7 +99,7 @@ This attribute enables and controls end-of-line normalization.  When a\n text file is normalized, its line endings are converted to LF in the\n repository.  To control what line ending style is used in the working\n directory, use the `eol` attribute for a single file and the\n-`core.autocrlf` configuration variable for all text files.\n+`core.eol` configuration variable for all text files.\n \n Set::\n \n@@ -120,9 +120,9 @@ Set to string value \"auto\"::\n \n Unspecified::\n \n-\tIf the `text` attribute is unspecified, git uses the `eol`\n-\tattribute and the `core.autocrlf` configuration variable to\n-\tdetermine if the file should be converted.\n+\tIf the `text` attribute is unspecified, git uses the\n+\t`core.autocrlf` configuration variable to determine if the\n+\tfile should be converted.\n \n Any other value causes git to act as if `text` has been left\n unspecified.\n@@ -132,19 +132,19 @@ unspecified.\n \n This attribute sets a specific line-ending style to be used in the\n working directory.  It enables end-of-line normalization without any\n-content checks, similar to setting the `text` attribute.\n+content checks, effectively setting the `text` attribute.\n \n Set to string value \"crlf\"::\n \n-\tThis setting forces git to normalize line endings on checkin\n-\tand convert them to CRLF when the file is checked out,\n-\tregardless of `text` and `core.autocrlf`.\n+\tThis setting forces git to normalize line endings for this\n+\tfile on checkin and convert them to CRLF when the file is\n+\tchecked out.\n \n Set to string value \"lf\"::\n \n \tThis setting forces git to normalize line endings to LF on\n \tcheckin and prevents conversion to CRLF when the file is\n-\tchecked out, regardless of `text` and `core.autocrlf`.\n+\tchecked out.\n \n Backwards compatibility with `crlf` attribute\n ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n@@ -193,9 +193,7 @@ config variable \"core.autocrlf\" without changing any attributes.\n This does not force normalization of all text files, but does ensure\n that text files that you introduce to the repository have their line\n endings normalized to LF when they are added, and that files that are\n-already normalized in the repository stay normalized.  You can also\n-set `autocrlf` to \"input\" to have automatic normalization of new text\n-files without conversion to CRLF in the working directory.\n+already normalized in the repository stay normalized.\n \n If you want to interoperate with a source code management system that\n enforces end-of-line normalization, or you simply want all text files\n@@ -207,7 +205,11 @@ attribute to \"auto\" for _all_ files.\n ------------------------\n \n This ensures that all files that git considers to be text will have\n-normalized (LF) line endings in the repository.\n+normalized (LF) line endings in the repository.  The `core.eol`\n+configuration variable controls which line endings git will use for\n+normalized files in your working directory; the default is to use the\n+native line ending for your platform, or CRLF if `core.autocrlf` is\n+set.\n \n NOTE: When `text=auto` normalization is enabled in an existing\n repository, any text files containing CRLFs should be normalized.  If\ndiff --git a/Makefile b/Makefile\nindex 910f471..419532e 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -224,6 +224,8 @@ all::\n #\n # Define CHECK_HEADER_DEPENDENCIES to check for problems in the hard-coded\n # dependency rules.\n+#\n+# Define NATIVE_CRLF if your platform uses CRLF for line endings.\n \n GIT-VERSION-FILE: FORCE\n \t@$(SHELL_PATH) ./GIT-VERSION-GEN\n@@ -989,6 +991,7 @@ ifeq ($(uname_S),Windows)\n \tNO_CURL = YesPlease\n \tNO_PYTHON = YesPlease\n \tBLK_SHA1 = YesPlease\n+\tNATIVE_CRLF = YesPlease\n \n \tCC = compat/vcbuild/scripts/clink.pl\n \tAR = compat/vcbuild/scripts/lib.pl\ndiff --git a/cache.h b/cache.h\nindex d1f669e..ac6bfbd 100644\n--- a/cache.h\n+++ b/cache.h\n@@ -568,6 +568,19 @@ enum auto_crlf {\n \n extern enum auto_crlf auto_crlf;\n \n+enum eol {\n+\tEOL_UNSET,\n+\tEOL_CRLF,\n+\tEOL_LF,\n+#ifdef NATIVE_CRLF\n+\tEOL_NATIVE = EOL_CRLF\n+#else\n+\tEOL_NATIVE = EOL_LF\n+#endif\n+};\n+\n+extern enum eol eol;\n+\n enum branch_track {\n \tBRANCH_TRACK_UNSPECIFIED = -1,\n \tBRANCH_TRACK_NEVER = 0,\ndiff --git a/config.c b/config.c\nindex b60a1ff..1479ee6 100644\n--- a/config.c\n+++ b/config.c\n@@ -461,6 +461,8 @@ static int git_default_core_config(const char *var, const char *value)\n \n \tif (!strcmp(var, \"core.autocrlf\")) {\n \t\tif (value && !strcasecmp(value, \"input\")) {\n+\t\t\tif (eol == EOL_CRLF)\n+\t\t\t\treturn error(\"core.autocrlf=input conflicts with core.eol=crlf\");\n \t\t\tauto_crlf = AUTO_CRLF_INPUT;\n \t\t\treturn 0;\n \t\t}\n@@ -477,6 +479,20 @@ static int git_default_core_config(const char *var, const char *value)\n \t\treturn 0;\n \t}\n \n+\tif (!strcmp(var, \"core.eol\")) {\n+\t\tif (value && !strcasecmp(value, \"lf\"))\n+\t\t\teol = EOL_LF;\n+\t\telse if (value && !strcasecmp(value, \"crlf\"))\n+\t\t\teol = EOL_CRLF;\n+\t\telse if (value && !strcasecmp(value, \"native\"))\n+\t\t\teol = EOL_NATIVE;\n+\t\telse\n+\t\t\teol = EOL_UNSET;\n+\t\tif (eol == EOL_CRLF && auto_crlf == AUTO_CRLF_INPUT)\n+\t\t\treturn error(\"core.autocrlf=input conflicts with core.eol=crlf\");\n+\t\treturn 0;\n+\t}\n+\n \tif (!strcmp(var, \"core.notesref\")) {\n \t\tnotes_ref_name = xstrdup(value);\n \t\treturn 0;\ndiff --git a/convert.c b/convert.c\nindex a309e07..915949e 100644\n--- a/convert.c\n+++ b/convert.c\n@@ -8,7 +8,7 @@\n  * This should use the pathname to decide on whether it wants to do some\n  * more interesting conversions (automatic gzip/unzip, general format\n  * conversions etc etc), but by default it just does automatic CRLF<->LF\n- * translation when the \"crlf\" attribute or \"auto_crlf\" option is set.\n+ * translation when the \"text\" attribute or \"auto_crlf\" option is set.\n  */\n \n enum action {\n@@ -20,12 +20,6 @@ enum action {\n \tCRLF_AUTO,\n };\n \n-enum eol {\n-\tEOL_UNSET,\n-\tEOL_LF,\n-\tEOL_CRLF,\n-};\n-\n struct text_stat {\n \t/* NUL, CR, LF and CRLF counts */\n \tunsigned nul, cr, lf, crlf;\n@@ -99,33 +93,55 @@ static int is_binary(unsigned long size, struct text_stat *stats)\n \treturn 0;\n }\n \n+static enum eol determine_output_conversion(enum action action) {\n+\tswitch (action) {\n+\tcase CRLF_BINARY:\n+\t\treturn EOL_UNSET;\n+\tcase CRLF_CRLF:\n+\t\treturn EOL_CRLF;\n+\tcase CRLF_INPUT:\n+\t\treturn EOL_LF;\n+\tcase CRLF_GUESS:\n+\t\tif (!auto_crlf)\n+\t\t\treturn EOL_UNSET;\n+\t\t/* fall through */\n+\tcase CRLF_TEXT:\n+\tcase CRLF_AUTO:\n+\t\tif (auto_crlf == AUTO_CRLF_TRUE)\n+\t\t\treturn EOL_CRLF;\n+\t\telse if (auto_crlf == AUTO_CRLF_INPUT)\n+\t\t\treturn EOL_LF;\n+\t\telse if (eol == EOL_UNSET)\n+\t\t\treturn EOL_NATIVE;\n+\t}\n+\treturn eol;\n+}\n+\n static void check_safe_crlf(const char *path, enum action action,\n                             struct text_stat *stats, enum safe_crlf checksafe)\n {\n \tif (!checksafe)\n \t\treturn;\n \n-\tif (action == CRLF_INPUT ||\n-\t    (action == CRLF_GUESS && auto_crlf == AUTO_CRLF_INPUT)) {\n+\tif (determine_output_conversion(action) == EOL_LF) {\n \t\t/*\n \t\t * CRLFs would not be restored by checkout:\n \t\t * check if we'd remove CRLFs\n \t\t */\n \t\tif (stats->crlf) {\n \t\t\tif (checksafe == SAFE_CRLF_WARN)\n-\t\t\t\twarning(\"CRLF will be replaced by LF in %s.\", path);\n+\t\t\t\twarning(\"CRLF will be replaced by LF in %s.\\nThe file will have its original line endings in your working directory.\", path);\n \t\t\telse /* i.e. SAFE_CRLF_FAIL */\n \t\t\t\tdie(\"CRLF would be replaced by LF in %s.\", path);\n \t\t}\n-\t} else if (action == CRLF_CRLF ||\n-\t\t   (action == CRLF_GUESS && auto_crlf == AUTO_CRLF_TRUE)) {\n+\t} else if (determine_output_conversion(action) == EOL_CRLF) {\n \t\t/*\n \t\t * CRLFs would be added by checkout:\n \t\t * check if we have \"naked\" LFs\n \t\t */\n \t\tif (stats->lf != stats->crlf) {\n \t\t\tif (checksafe == SAFE_CRLF_WARN)\n-\t\t\t\twarning(\"LF will be replaced by CRLF in %s\", path);\n+\t\t\t\twarning(\"LF will be replaced by CRLF in %s.\\nThe file will have its original line endings in your working directory.\", path);\n \t\t\telse /* i.e. SAFE_CRLF_FAIL */\n \t\t\t\tdie(\"LF would be replaced by CRLF in %s\", path);\n \t\t}\n@@ -244,11 +260,7 @@ static int crlf_to_worktree(const char *path, const char *src, size_t len,\n \tchar *to_free = NULL;\n \tstruct text_stat stats;\n \n-\tif ((action == CRLF_BINARY) || (action == CRLF_INPUT) ||\n-\t    (action != CRLF_CRLF && auto_crlf != AUTO_CRLF_TRUE))\n-\t\treturn 0;\n-\n-\tif (!len)\n+\tif (!len || determine_output_conversion(action) != EOL_CRLF)\n \t\treturn 0;\n \n \tgather_stats(src, len, &stats);\n@@ -670,7 +682,7 @@ int convert_to_git(const char *path, const char *src, size_t len,\n {\n \tstruct git_attr_check check[5];\n \tenum action action = CRLF_GUESS;\n-\tenum eol eol = EOL_UNSET;\n+\tenum eol eol_attr = EOL_UNSET;\n \tint ident = 0, ret = 0;\n \tconst char *filter = NULL;\n \n@@ -682,7 +694,7 @@ int convert_to_git(const char *path, const char *src, size_t len,\n \t\t\taction = git_path_check_crlf(path, check + 0);\n \t\tident = git_path_check_ident(path, check + 1);\n \t\tdrv = git_path_check_convert(path, check + 2);\n-\t\teol = git_path_check_eol(path, check + 3);\n+\t\teol_attr = git_path_check_eol(path, check + 3);\n \t\tif (drv && drv->clean)\n \t\t\tfilter = drv->clean;\n \t}\n@@ -692,7 +704,7 @@ int convert_to_git(const char *path, const char *src, size_t len,\n \t\tsrc = dst->buf;\n \t\tlen = dst->len;\n \t}\n-\taction = determine_action(action, eol);\n+\taction = determine_action(action, eol_attr);\n \tret |= crlf_to_git(path, src, len, dst, action, checksafe);\n \tif (ret) {\n \t\tsrc = dst->buf;\n@@ -705,7 +717,7 @@ int convert_to_working_tree(const char *path, const char *src, size_t len, struc\n {\n \tstruct git_attr_check check[5];\n \tenum action action = CRLF_GUESS;\n-\tenum eol eol = EOL_UNSET;\n+\tenum eol eol_attr = EOL_UNSET;\n \tint ident = 0, ret = 0;\n \tconst char *filter = NULL;\n \n@@ -717,7 +729,7 @@ int convert_to_working_tree(const char *path, const char *src, size_t len, struc\n \t\t\taction = git_path_check_crlf(path, check + 0);\n \t\tident = git_path_check_ident(path, check + 1);\n \t\tdrv = git_path_check_convert(path, check + 2);\n-\t\teol = git_path_check_eol(path, check + 3);\n+\t\teol_attr = git_path_check_eol(path, check + 3);\n \t\tif (drv && drv->smudge)\n \t\t\tfilter = drv->smudge;\n \t}\n@@ -727,7 +739,7 @@ int convert_to_working_tree(const char *path, const char *src, size_t len, struc\n \t\tsrc = dst->buf;\n \t\tlen = dst->len;\n \t}\n-\taction = determine_action(action, eol);\n+\taction = determine_action(action, eol_attr);\n \tret |= crlf_to_worktree(path, src, len, dst, action);\n \tif (ret) {\n \t\tsrc = dst->buf;\ndiff --git a/environment.c b/environment.c\nindex db4a5e9..83d38d3 100644\n--- a/environment.c\n+++ b/environment.c\n@@ -40,6 +40,7 @@ const char *editor_program;\n const char *excludes_file;\n enum auto_crlf auto_crlf = AUTO_CRLF_FALSE;\n int read_replace_refs = 1;\n+enum eol eol = EOL_UNSET;\n enum safe_crlf safe_crlf = SAFE_CRLF_WARN;\n unsigned whitespace_rule_cfg = WS_DEFAULT_RULE;\n enum branch_track git_branch_track = BRANCH_TRACK_REMOTE;\ndiff --git a/t/t0026-eol-config.sh b/t/t0026-eol-config.sh\nnew file mode 100755\nindex 0000000..f37ac8f\n--- /dev/null\n+++ b/t/t0026-eol-config.sh\n@@ -0,0 +1,83 @@\n+#!/bin/sh\n+\n+test_description='CRLF conversion'\n+\n+. ./test-lib.sh\n+\n+has_cr() {\n+\ttr '\\015' Q <\"$1\" | grep Q >/dev/null\n+}\n+\n+test_expect_success setup '\n+\n+\tgit config core.autocrlf false &&\n+\n+\techo \"one text\" > .gitattributes\n+\n+\tfor w in Hello world how are you; do echo $w; done >one &&\n+\tfor w in I am very very fine thank you; do echo $w; done >two &&\n+\tgit add . &&\n+\n+\tgit commit -m initial &&\n+\n+\tone=`git rev-parse HEAD:one` &&\n+\ttwo=`git rev-parse HEAD:two` &&\n+\n+\techo happy.\n+'\n+\n+test_expect_success 'eol=lf puts LFs in normalized file' '\n+\n+\trm -f .gitattributes tmp one two &&\n+\tgit config core.eol lf &&\n+\tgit read-tree --reset -u HEAD &&\n+\n+\t! has_cr one &&\n+\t! has_cr two &&\n+\tonediff=`git diff one` &&\n+\ttwodiff=`git diff two` &&\n+\ttest -z \"$onediff\" -a -z \"$twodiff\"\n+'\n+\n+test_expect_success 'eol=crlf puts CRLFs in normalized file' '\n+\n+\trm -f .gitattributes tmp one two &&\n+\tgit config core.eol crlf &&\n+\tgit read-tree --reset -u HEAD &&\n+\n+\thas_cr one &&\n+\t! has_cr two &&\n+\tonediff=`git diff one` &&\n+\ttwodiff=`git diff two` &&\n+\ttest -z \"$onediff\" -a -z \"$twodiff\"\n+'\n+\n+test_expect_success 'autocrlf=true overrides eol=lf' '\n+\n+\trm -f .gitattributes tmp one two &&\n+\tgit config core.eol lf &&\n+\tgit config core.autocrlf true &&\n+\tgit read-tree --reset -u HEAD &&\n+\n+\thas_cr one &&\n+\thas_cr two &&\n+\tonediff=`git diff one` &&\n+\ttwodiff=`git diff two` &&\n+\ttest -z \"$onediff\" -a -z \"$twodiff\"\n+'\n+\n+test_expect_success 'autocrlf=true overrides unset eol' '\n+\n+\trm -f .gitattributes tmp one two &&\n+\tgit config --unset-all core.eol &&\n+\tgit config core.autocrlf true &&\n+\tgit read-tree --reset -u HEAD &&\n+\n+\thas_cr one &&\n+\thas_cr two &&\n+\tonediff=`git diff one` &&\n+\ttwodiff=`git diff two` &&\n+\ttest -z \"$onediff\" -a -z \"$twodiff\"\n+'\n+\n+test_done\n-- \n1.7.1.5.g82828\n"},{"id":"149825","messageId":"20100904082509.GC10140@burratino","threadId":"24011","inReplyTo":"1275679748-7214-1-git-send-email-eyvind.bernhardsen@gmail.com","subject":"[PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2010-09-04T08:25:09Z","receivedAt":"2010-09-04T08:25:09Z","isPatch":true,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"If you try this:\n\n 1. Install Git for Windows (from the msysgit project)\n 2. Put\n\n\t[core]\n\t\tautocrlf = false\n\t\teol = native\n\n    in your .gitconfig.\n 3. Clone a project with\n\n\t*.txt text\n\n    in its .gitattributes.\n\nThen with current git, any text files checked out have LF line\nendings, instead of the expected CRLF.\n\nCc: Johannes Schindelin <johannes.schindelin@gmx.de>\nCc: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\n---\nEyvind Bernhardsen wrote:\n\n> Introduce a new configuration variable, \"core.eol\", that allows the user\n> to set which line endings to use for end-of-line-normalized files in the\n> working directory.  It defaults to \"native\", which means CRLF on Windows\n> and LF everywhere else.\n\nThe following fixup has been sitting in my tree (but not tested on\nWindows) for a couple of weeks.  Sensible?\n\nI don't know what the right choice for Cygwin is; probably LF unless\nthere is some way to detect the systemwide setting at run time.\n\n Makefile |    1 +\n 1 files changed, 1 insertions(+), 0 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 40fbcae..ba08051 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1125,6 +1125,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \t\tcompat/win32/pthread.o\n \tEXTLIBS += -lws2_32\n \tPTHREAD_LIBS =\n+\tNATIVE_CRLF = YesPlease\n \tX = .exe\n ifneq (,$(wildcard ../THIS_IS_MSYSGIT))\n \thtmldir=doc/git/html/\n-- \n1.7.2.3\n"},{"id":"150164","messageId":"7vbp8aqtuz.fsf@alter.siamese.dyndns.org","threadId":"24011","inReplyTo":"20100904082509.GC10140@burratino","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-09-07T00:29:08Z","receivedAt":"2010-09-07T00:29:08Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jonathan Nieder <jrnieder@gmail.com> writes:\n\n> If you try this:\n>\n>  1. Install Git for Windows (from the msysgit project)\n>  2. Put\n>\n> \t[core]\n> \t\tautocrlf = false\n> \t\teol = native\n>\n>     in your .gitconfig.\n>  3. Clone a project with\n>\n> \t*.txt text\n>\n>     in its .gitattributes.\n>\n> Then with current git, any text files checked out have LF line\n> endings, instead of the expected CRLF.\n>\n> Cc: Johannes Schindelin <johannes.schindelin@gmx.de>\n> Cc: Johannes Sixt <j6t@kdbg.org>\n> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n> ---\n> Eyvind Bernhardsen wrote:\n>\n>> Introduce a new configuration variable, \"core.eol\", that allows the user\n>> to set which line endings to use for end-of-line-normalized files in the\n>> working directory.  It defaults to \"native\", which means CRLF on Windows\n>> and LF everywhere else.\n>\n> The following fixup has been sitting in my tree (but not tested on\n> Windows) for a couple of weeks.  Sensible?\n>\n> I don't know what the right choice for Cygwin is; probably LF unless\n> there is some way to detect the systemwide setting at run time.\n\nHas anybody in Windows land any input?  I don't think what I do before\n1.7.3 in my tree would matter much, so I am not applying this myself.\n"},{"id":"151659","messageId":"4C9E2E06.1010909@ramsay1.demon.co.uk","threadId":"24011","inReplyTo":"7vbp8aqtuz.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2010-09-25T17:14:46Z","receivedAt":"2010-09-25T17:14:46Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Junio C Hamano wrote:\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n> \n\n>>\n>>> Introduce a new configuration variable, \"core.eol\", that allows the user\n>>> to set which line endings to use for end-of-line-normalized files in the\n>>> working directory.  It defaults to \"native\", which means CRLF on Windows\n>>> and LF everywhere else.\n>> The following fixup has been sitting in my tree (but not tested on\n>> Windows) for a couple of weeks.  Sensible?\n>>\n>> I don't know what the right choice for Cygwin is; probably LF unless\n>> there is some way to detect the systemwide setting at run time.\n> \n> Has anybody in Windows land any input?  I don't think what I do before\n> 1.7.3 in my tree would matter much, so I am not applying this myself.\n\nSorry for the late reply to this; I've only just noticed that I hadn't\nreplied! ;-)\n\nFWIW, I suspect that anything other than LF as the eol on Cygwin would\nbe *insane*. ;-D\n\nATB,\nRamsay Jones\n"},{"id":"203812","messageId":"1353857940941-7571889.post@n2.nabble.com","threadId":"24011","inReplyTo":"7vbp8aqtuz.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Mr_and_Mrs_D","fromEmail":"the.ubik@gmail.com","sentAt":"2012-11-25T15:39:00Z","receivedAt":"2012-11-25T15:39:00Z","isPatch":true,"sender":{"key":"the.ubik@gmail.com","avatar":"https://gravatar.com/avatar/1d625f1bf89affc956dae8519e1b65ed5d970523db6170104cbee0c3162a17e4?d=mp&s=160"},"body":"I am on windows 7 Pro - mingwin\n\nI decided to turn autocrlf to false and use .gitattributes instead and was\nbitten by this bug :\n\nhttp://stackoverflow.com/questions/13531988/git-line-endings-renormalize-does-not-seem-to-checkout-the-right-line-endings\n\nIt took me 2 days to figure this out\n\nPlease fix\n\n\n\n--\nView this message in context: http://git.661346.n2.nabble.com/PATCH-v6-Add-core-eol-config-variable-tp5140844p7571889.html\nSent from the git mailing list archive at Nabble.com.\n"},{"id":"214381","messageId":"loom.20130415T220316-790@post.gmane.org","threadId":"24011","inReplyTo":"1353857940941-7571889.post@n2.nabble.com","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Brice Lambson","fromEmail":"bricelam@live.com","sentAt":"2013-04-15T20:11:49Z","receivedAt":"2013-04-15T20:11:49Z","isPatch":true,"sender":{"key":"bricelam@live.com","avatar":null},"body":"Mr_and_Mrs_D <the.ubik <at> gmail.com> writes:\n\n\n\n> \n\n> I am on windows 7 Pro - mingwin\n\n> \n\n> I decided to turn autocrlf to false and use .gitattributes instead and was\n\n> bitten by this bug :\n\n> \n\n> http://stackoverflow.com/questions/13531988/git-line-endings-renormalize-\ndoes-not-seem-to-checkout-the-right-line-endings\n\n> \n\n> It took me 2 days to figure this out\n\n> \n\n> Please fix\n\n> \n\n> --\n\n> View this message in context: http://git.661346.n2.nabble.com/PATCH-v6-\nAdd-core-eol-config-variable-tp5140844p7571889.html\n\n> Sent from the git mailing list archive at Nabble.com.\n\n> \n\n\n\n+1, this is a significant issue downstream in Git for Windows:\n\n\n\nhttps://github.com/msysgit/git/issues/57\n\n\n\nEffectively this renders .gitattributes useless for the scenario of \nenforcing normalized line ending characters.\n"},{"id":"214388","messageId":"7v4nf7qzkd.fsf@alter.siamese.dyndns.org","threadId":"24011","inReplyTo":"7vbp8aqtuz.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-15T21:00:34Z","receivedAt":"2013-04-15T21:00:34Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Jonathan Nieder <jrnieder@gmail.com> writes:\n>\n>> If you try this:\n>>\n>>  1. Install Git for Windows (from the msysgit project)\n>>  2. Put\n>>\n>> \t[core]\n>> \t\tautocrlf = false\n>> \t\teol = native\n>>\n>>     in your .gitconfig.\n>>  3. Clone a project with\n>>\n>> \t*.txt text\n>>\n>>     in its .gitattributes.\n>>\n>> Then with current git, any text files checked out have LF line\n>> endings, instead of the expected CRLF.\n>>\n>> Cc: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> Cc: Johannes Sixt <j6t@kdbg.org>\n>> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n>> ---\n>> Eyvind Bernhardsen wrote:\n>>\n>>> Introduce a new configuration variable, \"core.eol\", that allows the user\n>>> to set which line endings to use for end-of-line-normalized files in the\n>>> working directory.  It defaults to \"native\", which means CRLF on Windows\n>>> and LF everywhere else.\n>>\n>> The following fixup has been sitting in my tree (but not tested on\n>> Windows) for a couple of weeks.  Sensible?\n>>\n>> I don't know what the right choice for Cygwin is; probably LF unless\n>> there is some way to detect the systemwide setting at run time.\n>\n> Has anybody in Windows land any input?  I don't think what I do before\n> 1.7.3 in my tree would matter much, so I am not applying this myself.\n\nPinging MsysGit folk again ...\n"},{"id":"214389","messageId":"CABPQNSaA7Qdt5eCZR3rs87gL730Y_xMrg6S-++YuaXdC2k45jg@mail.gmail.com","threadId":"24011","inReplyTo":"7v4nf7qzkd.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2013-04-15T21:20:01Z","receivedAt":"2013-04-15T21:20:01Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Mon, Apr 15, 2013 at 11:00 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n>\n>> Jonathan Nieder <jrnieder@gmail.com> writes:\n>>\n>>> If you try this:\n>>>\n>>>  1. Install Git for Windows (from the msysgit project)\n>>>  2. Put\n>>>\n>>>      [core]\n>>>              autocrlf = false\n>>>              eol = native\n>>>\n>>>     in your .gitconfig.\n>>>  3. Clone a project with\n>>>\n>>>      *.txt text\n>>>\n>>>     in its .gitattributes.\n>>>\n>>> Then with current git, any text files checked out have LF line\n>>> endings, instead of the expected CRLF.\n>>>\n>>> Cc: Johannes Schindelin <johannes.schindelin@gmx.de>\n>>> Cc: Johannes Sixt <j6t@kdbg.org>\n>>> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n>>> ---\n>>> Eyvind Bernhardsen wrote:\n>>>\n>>>> Introduce a new configuration variable, \"core.eol\", that allows the user\n>>>> to set which line endings to use for end-of-line-normalized files in the\n>>>> working directory.  It defaults to \"native\", which means CRLF on Windows\n>>>> and LF everywhere else.\n>>>\n>>> The following fixup has been sitting in my tree (but not tested on\n>>> Windows) for a couple of weeks.  Sensible?\n>>>\n>>> I don't know what the right choice for Cygwin is; probably LF unless\n>>> there is some way to detect the systemwide setting at run time.\n>>\n>> Has anybody in Windows land any input?  I don't think what I do before\n>> 1.7.3 in my tree would matter much, so I am not applying this myself.\n>\n> Pinging MsysGit folk again ...\n>\n>\n\nThis is absolutely the right thing to do. However, stuff have changed\na bit since the patch was written; this change now needs to go in\nconfig.mak.uname instead of config.mak.\n"},{"id":"214392","messageId":"7vsj2rpj0j.fsf@alter.siamese.dyndns.org","threadId":"24011","inReplyTo":"CABPQNSaA7Qdt5eCZR3rs87gL730Y_xMrg6S-++YuaXdC2k45jg@mail.gmail.com","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-15T21:43:24Z","receivedAt":"2013-04-15T21:43:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Erik Faye-Lund <kusmabite@gmail.com> writes:\n\n> This is absolutely the right thing to do. However, stuff have changed\n> a bit since the patch was written; this change now needs to go in\n> config.mak.uname instead of config.mak.\n\nThanks for a quick response.\n\nWhat's your preference?  I could just ignore a patch I won't be able\nto test myself and have you guys carry it in your tree forever, but\nI do not think that is necessary for something small like this.\n\nI think this is low impact enough that it can directly go to\n'master' or even 'maint' if I were to apply to my tree.\n\nThanks.\n\n-- >8 --\nFrom: Jonathan Nieder <jrnieder@gmail.com>\nDate: Sat, 4 Sep 2010 03:25:09 -0500\nSubject: [PATCH] convert: The native line-ending is \\r\\n on MinGW\n\nIf you try this:\n\n 1. Install Git for Windows (from the msysgit project)\n\n 2. Put\n\n\t[core]\n\t\tautocrlf = false\n\t\teol = native\n\n    in your .gitconfig.\n\n 3. Clone a project with\n\n\t*.txt text\n\n    in its .gitattributes.\n\nThen with current git, any text files checked out have LF line\nendings, instead of the expected CRLF.\n\nCc: Johannes Schindelin <johannes.schindelin@gmx.de>\nCc: Johannes Sixt <j6t@kdbg.org>\nSigned-off-by: Jonathan Nieder <jrnieder@gmail.com>\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n config.mak.uname | 1 +\n 1 file changed, 1 insertion(+)\n\ndiff --git a/config.mak.uname b/config.mak.uname\nindex 9080054..d78fd3d 100644\n--- a/config.mak.uname\n+++ b/config.mak.uname\n@@ -507,6 +507,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n \t\tcompat/win32/dirent.o\n \tEXTLIBS += -lws2_32\n \tPTHREAD_LIBS =\n+\tNATIVE_CRLF = YesPlease\n \tX = .exe\n \tSPARSE_FLAGS = -Wno-one-bit-signed-bitfield\n ifneq (,$(wildcard ../THIS_IS_MSYSGIT))\n-- \n1.8.2.1-542-g3613165\n"},{"id":"214489","messageId":"CABPQNSZwc8Ae_fGwvyEq84NuBNntB7-KXnJtqt9ZLowCJof9Gw@mail.gmail.com","threadId":"24011","inReplyTo":"7vsj2rpj0j.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Erik Faye-Lund","fromEmail":"kusmabite@gmail.com","sentAt":"2013-04-16T14:39:26Z","receivedAt":"2013-04-16T14:39:26Z","isPatch":true,"sender":{"key":"kusmabite@gmail.com","avatar":"https://avatars.githubusercontent.com/u/47073?v=4"},"body":"On Mon, Apr 15, 2013 at 11:43 PM, Junio C Hamano <gitster@pobox.com> wrote:\n> Erik Faye-Lund <kusmabite@gmail.com> writes:\n>\n>> This is absolutely the right thing to do. However, stuff have changed\n>> a bit since the patch was written; this change now needs to go in\n>> config.mak.uname instead of config.mak.\n>\n> Thanks for a quick response.\n>\n> What's your preference?  I could just ignore a patch I won't be able\n> to test myself and have you guys carry it in your tree forever, but\n> I do not think that is necessary for something small like this.\n\nI should probably clarify; conceptually, this is the right thing to\ndo. Git for Windows is a Windows application, and should have CRLF as\nthe native newline. I hadn't tested this patch myself, though. Our\ntree is currently way behind yours, and I tried to do a rebase, but it\nturned out much trickier than I was hoping for.\n\nI've given it a go on top of your tree + some essential patches I'll\nneed to get things to run, and it seems to do what it claims to do.\nHowever, I haven't been able to run the test-suite, because I need a\nbunch more patches from the msysGit-tree for that.\n\n> I think this is low impact enough that it can directly go to\n> 'master' or even 'maint' if I were to apply to my tree.\n>\n\nI agree. I don't think we need it in maint; we don't track that branch\nfor msysGit.\n\n> Thanks.\n>\n> -- >8 --\n> From: Jonathan Nieder <jrnieder@gmail.com>\n> Date: Sat, 4 Sep 2010 03:25:09 -0500\n> Subject: [PATCH] convert: The native line-ending is \\r\\n on MinGW\n>\n> If you try this:\n>\n>  1. Install Git for Windows (from the msysgit project)\n>\n>  2. Put\n>\n>         [core]\n>                 autocrlf = false\n>                 eol = native\n>\n>     in your .gitconfig.\n>\n>  3. Clone a project with\n>\n>         *.txt text\n>\n>     in its .gitattributes.\n>\n> Then with current git, any text files checked out have LF line\n> endings, instead of the expected CRLF.\n>\n> Cc: Johannes Schindelin <johannes.schindelin@gmx.de>\n> Cc: Johannes Sixt <j6t@kdbg.org>\n> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>  config.mak.uname | 1 +\n>  1 file changed, 1 insertion(+)\n>\n> diff --git a/config.mak.uname b/config.mak.uname\n> index 9080054..d78fd3d 100644\n> --- a/config.mak.uname\n> +++ b/config.mak.uname\n> @@ -507,6 +507,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n>                 compat/win32/dirent.o\n>         EXTLIBS += -lws2_32\n>         PTHREAD_LIBS =\n> +       NATIVE_CRLF = YesPlease\n>         X = .exe\n>         SPARSE_FLAGS = -Wno-one-bit-signed-bitfield\n>  ifneq (,$(wildcard ../THIS_IS_MSYSGIT))\n> --\n> 1.8.2.1-542-g3613165\n>\n\nLooks fine to me.\n"},{"id":"214506","messageId":"516D926A.70106@kdbg.org","threadId":"24011","inReplyTo":"CABPQNSZwc8Ae_fGwvyEq84NuBNntB7-KXnJtqt9ZLowCJof9Gw@mail.gmail.com","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Johannes Sixt","fromEmail":"j6t@kdbg.org","sentAt":"2013-04-16T18:03:22Z","receivedAt":"2013-04-16T18:03:22Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Am 16.04.2013 16:39, schrieb Erik Faye-Lund:\n> On Mon, Apr 15, 2013 at 11:43 PM, Junio C Hamano <gitster@pobox.com> wrote:\n>> Erik Faye-Lund <kusmabite@gmail.com> writes:\n>>\n>>> This is absolutely the right thing to do. However, stuff have changed\n>>> a bit since the patch was written; this change now needs to go in\n>>> config.mak.uname instead of config.mak.\n>>\n>> Thanks for a quick response.\n>>\n>> What's your preference?  I could just ignore a patch I won't be able\n>> to test myself and have you guys carry it in your tree forever, but\n>> I do not think that is necessary for something small like this.\n> \n> I should probably clarify; conceptually, this is the right thing to\n> do. Git for Windows is a Windows application, and should have CRLF as\n> the native newline. I hadn't tested this patch myself, though. Our\n> tree is currently way behind yours, and I tried to do a rebase, but it\n> turned out much trickier than I was hoping for.\n> \n> I've given it a go on top of your tree + some essential patches I'll\n> need to get things to run, and it seems to do what it claims to do.\n> However, I haven't been able to run the test-suite, because I need a\n> bunch more patches from the msysGit-tree for that.\n\nI have been using this patch or an equivalent one since at least one and\na half years (until a month or two ago, as I discovered today, but that\nis only by accident). But I do not use any text attributes or eol\nconfiguration, so I can only say that it does not regress this use case.\n\n> \n>> I think this is low impact enough that it can directly go to\n>> 'master' or even 'maint' if I were to apply to my tree.\n>>\n> \n> I agree. I don't think we need it in maint; we don't track that branch\n> for msysGit.\n\nYes, master is good enough.\n\nThanks.\n\n> \n>> Thanks.\n>>\n>> -- >8 --\n>> From: Jonathan Nieder <jrnieder@gmail.com>\n>> Date: Sat, 4 Sep 2010 03:25:09 -0500\n>> Subject: [PATCH] convert: The native line-ending is \\r\\n on MinGW\n>>\n>> If you try this:\n>>\n>>  1. Install Git for Windows (from the msysgit project)\n>>\n>>  2. Put\n>>\n>>         [core]\n>>                 autocrlf = false\n>>                 eol = native\n>>\n>>     in your .gitconfig.\n>>\n>>  3. Clone a project with\n>>\n>>         *.txt text\n>>\n>>     in its .gitattributes.\n>>\n>> Then with current git, any text files checked out have LF line\n>> endings, instead of the expected CRLF.\n>>\n>> Cc: Johannes Schindelin <johannes.schindelin@gmx.de>\n>> Cc: Johannes Sixt <j6t@kdbg.org>\n>> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>\n>> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n>> ---\n>>  config.mak.uname | 1 +\n>>  1 file changed, 1 insertion(+)\n>>\n>> diff --git a/config.mak.uname b/config.mak.uname\n>> index 9080054..d78fd3d 100644\n>> --- a/config.mak.uname\n>> +++ b/config.mak.uname\n>> @@ -507,6 +507,7 @@ ifneq (,$(findstring MINGW,$(uname_S)))\n>>                 compat/win32/dirent.o\n>>         EXTLIBS += -lws2_32\n>>         PTHREAD_LIBS =\n>> +       NATIVE_CRLF = YesPlease\n>>         X = .exe\n>>         SPARSE_FLAGS = -Wno-one-bit-signed-bitfield\n>>  ifneq (,$(wildcard ../THIS_IS_MSYSGIT))\n>> --\n>> 1.8.2.1-542-g3613165\n>>\n> \n> Looks fine to me.\n> \n"},{"id":"214516","messageId":"7vr4ial4bm.fsf@alter.siamese.dyndns.org","threadId":"24011","inReplyTo":"516D926A.70106@kdbg.org","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-04-16T18:26:37Z","receivedAt":"2013-04-16T18:26:37Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Johannes Sixt <j6t@kdbg.org> writes:\n\n>> I agree. I don't think we need it in maint; we don't track that branch\n>> for msysGit.\n>\n> Yes, master is good enough.\n\nThanks to all those involved.  Applied.\n"},{"id":"225158","messageId":"loom.20130813T193141-905@post.gmane.org","threadId":"24011","inReplyTo":"loom.20130415T220316-790@post.gmane.org","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Tvangeste","fromEmail":"i.4m.l33t@yandex.ru","sentAt":"2013-08-13T17:44:35Z","receivedAt":"2013-08-13T17:44:35Z","isPatch":true,"sender":{"key":"i.4m.l33t@yandex.ru","avatar":"https://gravatar.com/avatar/b40fe0cdae82b9e9153fa70da65df3a82d265376a8ee7ac5985a91e36b0bad98?d=mp&s=160"},"body":"Brice Lambson <bricelam <at> live.com> writes:\n> +1, this is a significant issue downstream in Git for Windows:\n> \n> https://github.com/msysgit/git/issues/57\n> \n> Effectively this renders .gitattributes useless for the scenario of \n> enforcing normalized line ending characters.\n\n+100\n\nFolks, the problem is still there, with the very latest Git built with MinGW \non Windows. Having eol=native in gitattributes means *LF* EOLs on \nWindows/MinGW.\n\nSo, essentially, eol=native is completely broken. And this is the most useful \noption to put into gitattributes and share among those working on the project.\n\nCurrently, I have to put eol=crlf there, and that means that those working on \nLinux will end up with CRLF files in their working copies.\n\nThe link quoted above does contain an additional fix that resolves the \nproblem.\n\nThanks,\n  --Tvangeste\n"},{"id":"225160","messageId":"7vioz9wjqy.fsf@alter.siamese.dyndns.org","threadId":"24011","inReplyTo":"loom.20130813T193141-905@post.gmane.org","subject":"Re: [PATCH master] convert: The native line-ending is \\r\\n on MinGW","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-08-13T18:03:49Z","receivedAt":"2013-08-13T18:03:49Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Tvangeste <i.4m.l33t@yandex.ru> writes:\n\n> Brice Lambson <bricelam <at> live.com> writes:\n>> +1, this is a significant issue downstream in Git for Windows:\n>> \n>> https://github.com/msysgit/git/issues/57\n>> \n>> Effectively this renders .gitattributes useless for the scenario of \n>> enforcing normalized line ending characters.\n>\n> +100\n>\n> Folks, the problem is still there, with the very latest Git built with MinGW \n> on Windows. Having eol=native in gitattributes means *LF* EOLs on \n> Windows/MinGW.\n\nThe patch in the thread you are responding to is v1.8.3-rc0~65, so\nas far as the upstream git.git is concerned the issue is closed, but\nI cannot say that inter-project coordination between us and Git for\nWindows are stellar (no we are not fighting against each other, but\nbeing less intimate with what the other is doing than we could be).\n\nJudging from how the original thread ended:\n\n  http://thread.gmane.org/gmane.comp.version-control.git/148436/focus=221438\n\nEric and J6t (cc'ed) are aware of this patch that went into 1.8.3,\nso...\n"}]}