Skip to content

Commit

Permalink
EOL handling
Browse files Browse the repository at this point in the history
This set of .gitattributes was automatically generated from the list of files
that GIT tried to normalize when I enabled automatic EOL conversion.

With this set of attributes, we prevent automated EOL conversion on files that
we know will cause trouble down the road.
  • Loading branch information
harinath committed Jul 25, 2010
1 parent a8101ea commit b293948
Show file tree
Hide file tree
Showing 759 changed files with 4,459 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .gitattributes
@@ -0,0 +1,61 @@
*.c crlf
*.h crlf
*.cs crlf
*.sh crlf

ChangeLog crlf
*akefile* crlf
*.sources crlf

# don't do anything to line-endings. Let CRLFs go into the repo
*.bat -crlf
*.sln -crlf
*.*proj* -crlf

# CRLF Handling
# -------------
#
# The ideal situation would be to do no EOL normalization. Each file
# would have a default EOL, and tools on Windows and Linux would handle
# both EOL formats.
#
# We're not in the ideal world. A popular editor on Windows (possibly
# Visual Studio) silently introduces EOL corruption -- it displays an
# LF-file normally, but any newly added lines have CRLF. On Linux,
# Emacs and versions of VI handle LF-files and CRLF-files properly.
# However, emacs doesn't like files with both LF and CRLF EOLs. Editing
# the file without additional action will increase the EOL corruption
# in the file.
#
# Another vector for mixed EOLs is scripts. We mostly don't have scripts
# that add new lines -- so we rarely see this. However, one major event
# in the tree was the addition of copyright headers using a script. That
# script introduced EOL corruption.
#
# Any automated EOL normalization of files already in the repository will
# cause difficulties in traversing histories, assigning blame, etc. So, we
# don't want to change what's in the repository significantly, even if it
# causes trouble.
#
# What we do now:
#
# a) we ensure that there's no further corruption of LF-files. So, we use
# git's 'crlf' attribute on those files to ensure that things are fine
# when we work on Windows. We could use 'crlf=input', but it doesn't buy
# us much -- we might as well be working with consistent EOLs for files in
# working directories as well as in the repository
#
# b) if the file already of CRLFs, we don't do any normalization. We use '-crlf'
# so that git doesn't do any EOL-conversion of the file. As I said, this
# is mostly harmless on Linux. We can't mark these files as 'crlf' or use
# the new (git 1.7.2) 'eol=crlf' attribute, since it changes the contents
# _inside_ the repository [1], and hence makes history traversal annoying.
# So, we live with occasional EOL corruption.
#
# c) We can handle mixed-EOL files on a case-by-case basis, converting them to
# LF- or CRLF-files based on which causes fewer lines to change
#
# d) We try to ensure no further headaches, by declaring EOL normalization on
# code files, and Unix-flavoured files, like shell-scripts, makefiles, etc.
#
# [1] GIT use LFs as the normalized internal representation.
1 change: 1 addition & 0 deletions data/net_2_0/Browsers/.gitattributes
@@ -0,0 +1 @@
/Compat.browser -crlf
30 changes: 30 additions & 0 deletions docs/HtmlAgilityPack/.gitattributes
@@ -0,0 +1,30 @@
/EncodingFoundException.cs -crlf
/HtmlAttribute.cs -crlf
/HtmlAttributeCollection.cs -crlf
/HtmlCmdLine.cs -crlf
/HtmlCommentNode.cs -crlf
/HtmlConsoleListener.cs -crlf
/HtmlDocument.cs -crlf
/HtmlElementFlag.cs -crlf
/HtmlEntity.cs -crlf
/HtmlNameTable.cs -crlf
/HtmlNode.cs -crlf
/HtmlNodeCollection.cs -crlf
/HtmlNodeNavigator.cs -crlf
/HtmlNodeType.cs -crlf
/HtmlParseError.cs -crlf
/HtmlParseErrorCode.cs -crlf
/HtmlTextNode.cs -crlf
/HtmlWeb.cs -crlf
/HtmlWebException.cs -crlf
/IOLibrary.cs -crlf
/LICENSE -crlf
/MixedCodeDocument.cs -crlf
/MixedCodeDocumentCodeFragment.cs -crlf
/MixedCodeDocumentFragment.cs -crlf
/MixedCodeDocumentFragmentList.cs -crlf
/MixedCodeDocumentFragmentType.cs -crlf
/MixedCodeDocumentTextFragment.cs -crlf
/NameValuePair.cs -crlf
/NameValuePairList.cs -crlf
/crc32.cs -crlf
3 changes: 3 additions & 0 deletions libgc/.gitattributes
@@ -0,0 +1,3 @@
/BCC_MAKEFILE -crlf
/digimars.mak -crlf
/win32_threads.c -crlf
1 change: 1 addition & 0 deletions libgc/include/private/.gitattributes
@@ -0,0 +1 @@
/gcconfig.h -crlf
2 changes: 2 additions & 0 deletions mcs/.gitattributes
@@ -0,0 +1,2 @@
/LICENSE.MSPL -crlf
/ScalableMonoIcon.svg -crlf
2 changes: 2 additions & 0 deletions mcs/build/msbuild/.gitattributes
@@ -0,0 +1,2 @@
/Mono.Common.targets -crlf
/Mono.Default.targets -crlf
1 change: 1 addition & 0 deletions mcs/class/Accessibility/.gitattributes
@@ -0,0 +1 @@
/makefile.build -crlf
1 change: 1 addition & 0 deletions mcs/class/Commons.Xml.Relaxng/.gitattributes
@@ -0,0 +1 @@
/README -crlf
@@ -0,0 +1,3 @@
/RncParser.jay -crlf
/RncTokenizer.cs -crlf
/RncWriter.cs -crlf
1 change: 1 addition & 0 deletions mcs/class/Commons.Xml.Relaxng/Commons.Xml/.gitattributes
@@ -0,0 +1 @@
/XmlDefaultReader.cs -crlf
2 changes: 2 additions & 0 deletions mcs/class/Commons.Xml.Relaxng/Documentation/en/.gitattributes
@@ -0,0 +1,2 @@
/ns-Commons.Xml.Nvdl.xml -crlf
/ns-Commons.Xml.Relaxng.xml -crlf
@@ -0,0 +1,49 @@
/Nvdl.xml -crlf
/NvdlAction.xml -crlf
/NvdlActionList.xml -crlf
/NvdlAllow.xml -crlf
/NvdlAnyNamespace.xml -crlf
/NvdlAttach.xml -crlf
/NvdlAttachPlaceHolder.xml -crlf
/NvdlAttributable.xml -crlf
/NvdlBuiltInValidationProvider.xml -crlf
/NvdlCancelAction.xml -crlf
/NvdlCompileException.xml -crlf
/NvdlConfig.xml -crlf
/NvdlContext.xml -crlf
/NvdlContextList.xml -crlf
/NvdlElementBase.xml -crlf
/NvdlException.xml -crlf
/NvdlIncludedMode.xml -crlf
/NvdlMessage.xml -crlf
/NvdlMessageEventArgs.xml -crlf
/NvdlMessageEventHandler.xml -crlf
/NvdlMessageList.xml -crlf
/NvdlMode.xml -crlf
/NvdlModeBase.xml -crlf
/NvdlModeList.xml -crlf
/NvdlModeUsage.xml -crlf
/NvdlNamespace.xml -crlf
/NvdlNestedMode.xml -crlf
/NvdlNoCancelAction.xml -crlf
/NvdlNoResultAction.xml -crlf
/NvdlOption.xml -crlf
/NvdlOptionList.xml -crlf
/NvdlReader.xml -crlf
/NvdlReject.xml -crlf
/NvdlRelaxngValidatorProvider.xml -crlf
/NvdlResultAction.xml -crlf
/NvdlResultType.xml -crlf
/NvdlRule.xml -crlf
/NvdlRuleList.xml -crlf
/NvdlRuleTarget.xml -crlf
/NvdlRules.xml -crlf
/NvdlTrigger.xml -crlf
/NvdlTriggerList.xml -crlf
/NvdlUnwrap.xml -crlf
/NvdlValidate.xml -crlf
/NvdlValidatingReader.xml -crlf
/NvdlValidationException.xml -crlf
/NvdlValidationProvider.xml -crlf
/NvdlValidatorGenerator.xml -crlf
/NvdlXsdValidatorProvider.xml -crlf
@@ -0,0 +1 @@
/RncParser.xml -crlf
@@ -0,0 +1,50 @@
/IGrammarContent.xml -crlf
/RelaxngAnyName.xml -crlf
/RelaxngAttribute.xml -crlf
/RelaxngBinaryContentPattern.xml -crlf
/RelaxngChoice.xml -crlf
/RelaxngData.xml -crlf
/RelaxngDataSupport.xml -crlf
/RelaxngDatatype.xml -crlf
/RelaxngDatatypeProvider.xml -crlf
/RelaxngDefine.xml -crlf
/RelaxngDiv.xml -crlf
/RelaxngElement.xml -crlf
/RelaxngElementBase.xml -crlf
/RelaxngEmpty.xml -crlf
/RelaxngExcept.xml -crlf
/RelaxngExceptNameClass.xml -crlf
/RelaxngException.xml -crlf
/RelaxngExternalRef.xml -crlf
/RelaxngGrammar.xml -crlf
/RelaxngGrammarContentList.xml -crlf
/RelaxngGroup.xml -crlf
/RelaxngInclude.xml -crlf
/RelaxngInterleave.xml -crlf
/RelaxngList.xml -crlf
/RelaxngMergedProvider.xml -crlf
/RelaxngMixed.xml -crlf
/RelaxngName.xml -crlf
/RelaxngNameChoice.xml -crlf
/RelaxngNameClass.xml -crlf
/RelaxngNameClassList.xml -crlf
/RelaxngNotAllowed.xml -crlf
/RelaxngNsName.xml -crlf
/RelaxngOneOrMore.xml -crlf
/RelaxngOptional.xml -crlf
/RelaxngParam.xml -crlf
/RelaxngParamList.xml -crlf
/RelaxngParentRef.xml -crlf
/RelaxngPattern.xml -crlf
/RelaxngPatternList.xml -crlf
/RelaxngPatternType.xml -crlf
/RelaxngReader.xml -crlf
/RelaxngRef.xml -crlf
/RelaxngSingleContentPattern.xml -crlf
/RelaxngStart.xml -crlf
/RelaxngString.xml -crlf
/RelaxngText.xml -crlf
/RelaxngToken.xml -crlf
/RelaxngValidatingReader.xml -crlf
/RelaxngValue.xml -crlf
/RelaxngZeroOrMore.xml -crlf
@@ -0,0 +1 @@
/XmlDefaultReader.xml -crlf
7 changes: 7 additions & 0 deletions mcs/class/Commons.Xml.Relaxng/Test/XmlFiles/.gitattributes
@@ -0,0 +1,7 @@
/SimpleElementPattern1.rng -crlf
/SimpleElementPattern1.xml -crlf
/SimpleElementPattern2.rng -crlf
/SimpleElementPattern2.xml -crlf
/atom.rnc -crlf
/relaxng.rnc -crlf
/team.rng -crlf
@@ -0,0 +1,3 @@
/README -crlf
/anglia-test-runner.cs -crlf
/relaxngtest.cs -crlf
@@ -0,0 +1,2 @@
/AssemblyInfo.cs -crlf
/ZipException.cs -crlf
@@ -0,0 +1,4 @@
/BZip2.cs -crlf
/BZip2Constants.cs -crlf
/BZip2InputStream.cs -crlf
/BZip2OutputStream.cs -crlf
@@ -0,0 +1,4 @@
/Adler32.cs -crlf
/Crc32.cs -crlf
/IChecksum.cs -crlf
/StrangeCrc.cs -crlf
@@ -0,0 +1,3 @@
/GZipConstants.cs -crlf
/GZipInputStream.cs -crlf
/GZipOutputStream.cs -crlf
@@ -0,0 +1,7 @@
/InvalidHeaderException.cs -crlf
/TarArchive.cs -crlf
/TarBuffer.cs -crlf
/TarEntry.cs -crlf
/TarHeader.cs -crlf
/TarInputStream.cs -crlf
/TarOutputStream.cs -crlf
@@ -0,0 +1,5 @@
/ZipConstants.cs -crlf
/ZipEntry.cs -crlf
/ZipFile.cs -crlf
/ZipInputStream.cs -crlf
/ZipOutputStream.cs -crlf
@@ -0,0 +1,9 @@
/Deflater.cs -crlf
/DeflaterConstants.cs -crlf
/DeflaterEngine.cs -crlf
/DeflaterHuffman.cs -crlf
/DeflaterPending.cs -crlf
/Inflater.cs -crlf
/InflaterDynHeader.cs -crlf
/InflaterHuffmanTree.cs -crlf
/PendingBuffer.cs -crlf
@@ -0,0 +1,4 @@
/DeflaterOutputStream.cs -crlf
/InflaterInputStream.cs -crlf
/OutputWindow.cs -crlf
/StreamManipulator.cs -crlf
1 change: 1 addition & 0 deletions mcs/class/I18N/Common/.gitattributes
@@ -0,0 +1 @@
/ByteEncoding.cs -crlf
1 change: 1 addition & 0 deletions mcs/class/IBM.Data.DB2/Assembly/.gitattributes
@@ -0,0 +1 @@
/AssemblyInfo.cs -crlf
18 changes: 18 additions & 0 deletions mcs/class/IBM.Data.DB2/IBM.Data.DB2/.gitattributes
@@ -0,0 +1,18 @@
/DB2ClientUtils.cs -crlf
/DB2Command.cs -crlf
/DB2CommandBuilder.cs -crlf
/DB2Connection.cs -crlf
/DB2ConnectionPool.cs -crlf
/DB2ConnectionSettings.cs -crlf
/DB2Constants.cs -crlf
/DB2DataReader.cs -crlf
/DB2Environment.cs -crlf
/DB2Error.cs -crlf
/DB2ErrorCollection.cs -crlf
/DB2Exception.cs -crlf
/DB2InfoMessageEventHandler.cs -crlf
/DB2OpenConnection.cs -crlf
/DB2Parameter.cs -crlf
/DB2ParameterCollection.cs -crlf
/DB2Transaction.cs -crlf
/DB2Type.cs -crlf
@@ -0,0 +1,4 @@
/AssemblyInfo.cs -crlf
/ICSharpCode.SharpZLib.prjx -crlf
/Main.cs -crlf
/SharpZipBaseException.cs -crlf
@@ -0,0 +1,5 @@
/BZip2.cs -crlf
/BZip2Constants.cs -crlf
/BZip2Exception.cs -crlf
/BZip2InputStream.cs -crlf
/BZip2OutputStream.cs -crlf
@@ -0,0 +1,4 @@
/Adler32.cs -crlf
/CRC32.cs -crlf
/IChecksum.cs -crlf
/StrangeCRC.cs -crlf
@@ -0,0 +1,4 @@
/FileSystemScanner.cs -crlf
/INameTransform.cs -crlf
/NameFilter.cs -crlf
/PathFilter.cs -crlf
@@ -0,0 +1 @@
/PkzipClassic.cs -crlf
@@ -0,0 +1,4 @@
/GZIPConstants.cs -crlf
/GZipException.cs -crlf
/GzipInputStream.cs -crlf
/GzipOutputStream.cs -crlf
@@ -0,0 +1,8 @@
/InvalidHeaderException.cs -crlf
/TarArchive.cs -crlf
/TarBuffer.cs -crlf
/TarEntry.cs -crlf
/TarException.cs -crlf
/TarHeader.cs -crlf
/TarInputStream.cs -crlf
/TarOutputStream.cs -crlf
@@ -0,0 +1,8 @@
/FastZip.cs -crlf
/ZipConstants.cs -crlf
/ZipEntry.cs -crlf
/ZipException.cs -crlf
/ZipFile.cs -crlf
/ZipInputStream.cs -crlf
/ZipNameTransform.cs -crlf
/ZipOutputStream.cs -crlf
@@ -0,0 +1,9 @@
/Deflater.cs -crlf
/DeflaterConstants.cs -crlf
/DeflaterEngine.cs -crlf
/DeflaterHuffman.cs -crlf
/DeflaterPending.cs -crlf
/Inflater.cs -crlf
/InflaterDynHeader.cs -crlf
/InflaterHuffmanTree.cs -crlf
/PendingBuffer.cs -crlf
@@ -0,0 +1,4 @@
/DeflaterOutputStream.cs -crlf
/InflaterInputStream.cs -crlf
/OutputWindow.cs -crlf
/StreamManipulator.cs -crlf
1 change: 1 addition & 0 deletions mcs/class/Mainsoft.Configuration/.gitattributes
@@ -0,0 +1 @@
/makefile.build -crlf
@@ -0,0 +1,2 @@
/MainsoftWebSectionGroup.cs -crlf
/PagesSection.cs -crlf
1 change: 1 addition & 0 deletions mcs/class/Mainsoft.Configuration/Properties/.gitattributes
@@ -0,0 +1 @@
/AssemblyInfo.cs -crlf
1 change: 1 addition & 0 deletions mcs/class/Mainsoft.Web/.gitattributes
@@ -0,0 +1 @@
/makefile.build -crlf
@@ -0,0 +1,3 @@
/Web.config -crlf
/Web.config.bak -crlf
/makefile.build -crlf
@@ -0,0 +1 @@
/GlobalResource.resx -crlf
@@ -0,0 +1,7 @@
/CreateRole.aspx.resx -crlf
/CreateUser.aspx.resx -crlf
/Default.aspx.resx -crlf
/EditUser.aspx.resx -crlf
/ManageRole.aspx.resx -crlf
/ManageUser.aspx.resx -crlf
/Util.Master.resx -crlf
@@ -0,0 +1,5 @@
/Searcher.ascx -crlf
/Searcher.ascx.cs -crlf
/Searcher.ascx.cs.bak -crlf
/Searcher.ascx.designer.cs -crlf
/Searcher.ascx.designer.cs.bak -crlf
@@ -0,0 +1,2 @@
/AssemblyInfo.cs -crlf
/AssemblyInfo.cs.bak -crlf

0 comments on commit b293948

Please sign in to comment.