From: Raja R Harinath Date: Sun, 1 Aug 2010 18:34:50 +0000 (+0530) Subject: Re-enable 'crlf' attributes on *.cs X-Git-Url: http://wien.tomnetworks.com/gitweb/?p=mono.git;a=commitdiff_plain;h=eef99c6b19efbf1787792f19878ed518c99ac91d Re-enable 'crlf' attributes on *.cs This fixes EOL conversions flagged by git 1.7.1 core.autocrlf=true. At this point, neither git 1.7.1 nor 1.7.2 show any automatic CRLF normalization. I think we're ready for another experiment. There seems to be a difference in the handling of mixed line-ending files between git 1.7.2 and older versions, when core.autocrlf is set to true. --- diff --git a/.gitattributes b/.gitattributes index 9f803813ed2..9bce5208ff0 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,13 +1,18 @@ -#*.c crlf -#*.h crlf -#*.cs crlf -#*.sh crlf +# ensure LF endings on all checkouts +configure.in crlf=input -#ChangeLog crlf -#*akefile* crlf -#*.sources crlf +# ensure native line endings on checkout +*.c crlf +*.h crlf +*.cs crlf +*.sh crlf -# don't do anything to line-endings. Let CRLFs go into the repo +.gitattributes crlf +ChangeLog crlf +*akefile* crlf +*.sources crlf + +# don't do anything to line-endings. Let CRLFs go into the repo, and CRLF on checkout *.bat -crlf *.sln -crlf *.*proj* -crlf diff --git a/mcs/errors/.gitattributes b/mcs/errors/.gitattributes index cbea4b09171..581562408d8 100644 --- a/mcs/errors/.gitattributes +++ b/mcs/errors/.gitattributes @@ -79,3 +79,5 @@ /cs1746.cs -crlf /gcs0307-5.cs -crlf /gcs1579.cs -crlf +/CS0534-6-lib.cs -crlf +/cs0133-2.cs -crlf diff --git a/mcs/mcs/import.cs b/mcs/mcs/import.cs index 597b1a39acc..234429676cc 100644 --- a/mcs/mcs/import.cs +++ b/mcs/mcs/import.cs @@ -682,11 +682,11 @@ namespace Mono.CSharp } if ((ma & MethodAttributes.Static) != 0) { - mod |= Modifiers.STATIC; + mod |= Modifiers.STATIC; return mod; } if ((ma & MethodAttributes.Abstract) != 0 && declaringType.IsClass) { - mod |= Modifiers.ABSTRACT; + mod |= Modifiers.ABSTRACT; return mod; } diff --git a/mcs/mcs/namespace.cs b/mcs/mcs/namespace.cs index 040363edeff..a7442ae87c0 100644 --- a/mcs/mcs/namespace.cs +++ b/mcs/mcs/namespace.cs @@ -1046,11 +1046,11 @@ namespace Mono.CSharp { candidates = a; else candidates.AddRange (a); - } - - scope = parent; - if (candidates != null) - return candidates; + } + + scope = parent; + if (candidates != null) + return candidates; if (parent == null) return null; @@ -1060,8 +1060,8 @@ namespace Mono.CSharp { // Namespace parent_ns = ns.Parent; do { - candidates = parent_ns.LookupExtensionMethod (extensionType, null, name, arity); - if (candidates != null) + candidates = parent_ns.LookupExtensionMethod (extensionType, null, name, arity); + if (candidates != null) return candidates; parent_ns = parent_ns.Parent; diff --git a/mcs/tests/.gitattributes b/mcs/tests/.gitattributes index b823b23c280..2f1fd72e9df 100644 --- a/mcs/tests/.gitattributes +++ b/mcs/tests/.gitattributes @@ -46,3 +46,7 @@ /gtest-525.cs -crlf /gtest-linq-24.cs -crlf /test-788.cs -crlf +/gtest-anon-63.cs -crlf +/gtest-exmethod-37.cs -crlf +/gtest-iter-14.cs -crlf +/test-anon-95.cs -crlf