Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Sohn2018-06-13 19:35:40 +0000
committerMatthias Sohn2018-06-13 19:38:21 +0000
commit8dc68a796f95892e7caead640f61460b2281582d (patch)
tree28dd3935a74abf750ffeb49288c0e0e178628576 /org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal
parent26732b69ea84b841cc8ff122ee9c6a2fc368998a (diff)
downloadegit-8dc68a796f95892e7caead640f61460b2281582d.tar.gz
egit-8dc68a796f95892e7caead640f61460b2281582d.tar.xz
egit-8dc68a796f95892e7caead640f61460b2281582d.zip
Fix merge of wrong patchset of "EGit integration for LFS"
By rebasing an outdated version I submitted patchset 8 [1] instead of patchset 7 [2] of the change "EGit integration for LFS". This is the reverse delta between these two patchsets. [1] https://git.eclipse.org/r/#/c/124333/8 [2] https://git.eclipse.org/r/#/c/124333/7 Change-Id: Id513120ea153a14991c3925cd676f5738aa49167 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
Diffstat (limited to 'org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal')
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java23
1 files changed, 7 insertions, 16 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java
index d45732baea..56cdd065b5 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/CompareUtils.java
@@ -68,7 +68,6 @@ import org.eclipse.egit.ui.internal.synchronize.compare.LocalNonWorkspaceTypedEl
import org.eclipse.jface.action.Action;
import org.eclipse.jface.util.OpenStrategy;
import org.eclipse.jgit.annotations.NonNull;
-import org.eclipse.jgit.attributes.Attributes;
import org.eclipse.jgit.dircache.DirCache;
import org.eclipse.jgit.dircache.DirCacheCheckout.CheckoutMetadata;
import org.eclipse.jgit.dircache.DirCacheEditor;
@@ -93,8 +92,6 @@ import org.eclipse.jgit.treewalk.filter.NotIgnoredFilter;
import org.eclipse.jgit.treewalk.filter.PathFilterGroup;
import org.eclipse.jgit.treewalk.filter.TreeFilter;
import org.eclipse.jgit.util.IO;
-import org.eclipse.jgit.util.LfsFactory;
-import org.eclipse.jgit.util.LfsFactory.LfsInputStream;
import org.eclipse.jgit.util.io.EolStreamTypeUtil;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Display;
@@ -1105,21 +1102,15 @@ public class CompareUtils {
if (ent.getFileMode() != FileMode.REGULAR_FILE)
ent.setFileMode(FileMode.REGULAR_FILE);
+ ent.setLength(content.limit());
ent.setLastModified(System.currentTimeMillis());
try {
- Attributes attr = LfsFactory.getAttributesForPath(repo,
- ent.getPathString());
- try (LfsInputStream lfs = LfsFactory.getInstance()
- .applyCleanFilter(repo,
- new ByteArrayInputStream(content.array(), 0,
- content.limit()),
- content.limit(),
- attr.get(Constants.ATTR_MERGE))) {
- ent.setLength(lfs.getLength());
- ent.setObjectId(inserter.insert(Constants.OBJ_BLOB,
- lfs.getLength(), lfs));
- inserter.flush();
- }
+ ByteArrayInputStream in = new ByteArrayInputStream(
+ content.array(), 0, content.limit());
+ ent.setObjectId(
+ inserter.insert(Constants.OBJ_BLOB, content.limit(),
+ in));
+ inserter.flush();
} catch (IOException ex) {
throw new RuntimeException(ex);
}

Back to the top