diff options
author | Christian Halstrick <christian.halstrick@sap.com> | 2017-08-14 03:34:57 -0400 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org <gerrit@eclipse.org> | 2017-08-14 03:34:57 -0400 |
commit | 196915dde541094696405fa7469d573c4caae6e6 (patch) | |
tree | 145e200c81adb87b0b2af6f865405b8a7c8e4d5e /org.eclipse.jgit | |
parent | 53dd9a9e4bc5ae325a70387882cdd38a71c8deca (diff) | |
parent | a489a8ae9ad16d7f811962997e91d31a0c07f195 (diff) | |
download | jgit-196915dde541094696405fa7469d573c4caae6e6.tar.gz jgit-196915dde541094696405fa7469d573c4caae6e6.zip |
Merge "Ensure EOL stream type is DIRECT when -text attribute is present"
Diffstat (limited to 'org.eclipse.jgit')
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java index c95992fbc2..727c1f4ad6 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/util/io/EolStreamTypeUtil.java @@ -144,6 +144,11 @@ public final class EolStreamTypeUtil { private static EolStreamType checkInStreamType(WorkingTreeOptions options, Attributes attrs) { + if (attrs.isUnset("text")) {//$NON-NLS-1$ + // "binary" or "-text" (which is included in the binary expansion) + return EolStreamType.DIRECT; + } + // old git system if (attrs.isSet("crlf")) {//$NON-NLS-1$ return EolStreamType.TEXT_LF; @@ -154,9 +159,6 @@ public final class EolStreamTypeUtil { } // new git system - if (attrs.isUnset("text")) {//$NON-NLS-1$ - return EolStreamType.DIRECT; - } String eol = attrs.getValue("eol"); //$NON-NLS-1$ if (eol != null) // check-in is always normalized to LF @@ -183,6 +185,11 @@ public final class EolStreamTypeUtil { private static EolStreamType checkOutStreamType(WorkingTreeOptions options, Attributes attrs) { + if (attrs.isUnset("text")) {//$NON-NLS-1$ + // "binary" or "-text" (which is included in the binary expansion) + return EolStreamType.DIRECT; + } + // old git system if (attrs.isSet("crlf")) {//$NON-NLS-1$ return FORCE_EOL_LF_ON_CHECKOUT ? EolStreamType.TEXT_LF @@ -194,9 +201,6 @@ public final class EolStreamTypeUtil { } // new git system - if (attrs.isUnset("text")) {//$NON-NLS-1$ - return EolStreamType.DIRECT; - } String eol = attrs.getValue("eol"); //$NON-NLS-1$ if (eol != null && "crlf".equals(eol)) //$NON-NLS-1$ return EolStreamType.TEXT_CRLF; |