From 61df78ddbc8f3059aa38a6b86c0f73de0f333582 Mon Sep 17 00:00:00 2001 From: Arthur Daussy Date: Wed, 24 Jan 2018 16:17:09 +0100 Subject: [PATCH] [530250] Fix RecursiveModelMerger to be able to handle Git attributes See org.eclipse.jgit.merge.ResolveMerger.mergeTreeWalk(TreeWalk, boolean) Bug : 530250 Signed-off-by: Arthur Daussy Change-Id: Ifdd7dfc864b94fc0dbb4723d340fe607c500f5ae --- .../eclipse/emf/compare/egit/internal/merge/RecursiveModelMerger.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/org.eclipse.emf.compare.egit/src/org/eclipse/emf/compare/egit/internal/merge/RecursiveModelMerger.java b/plugins/org.eclipse.emf.compare.egit/src/org/eclipse/emf/compare/egit/internal/merge/RecursiveModelMerger.java index 1c755da7c..84c2dc449 100644 --- a/plugins/org.eclipse.emf.compare.egit/src/org/eclipse/emf/compare/egit/internal/merge/RecursiveModelMerger.java +++ b/plugins/org.eclipse.emf.compare.egit/src/org/eclipse/emf/compare/egit/internal/merge/RecursiveModelMerger.java @@ -250,12 +250,13 @@ public class RecursiveModelMerger extends RecursiveMerger { private boolean fallBackToDefaultMerge(TreeWalk treeWalk, boolean ignoreConflicts) throws MissingObjectException, IncorrectObjectTypeException, CorruptObjectException, IOException { boolean hasWorkingTreeIterator = tw.getTreeCount() > T_FILE; + boolean hasAttributeNodeProvider = treeWalk.getAttributesNodeProvider() != null; return processEntry(treeWalk.getTree(T_BASE, CanonicalTreeParser.class), treeWalk.getTree(T_OURS, CanonicalTreeParser.class), treeWalk.getTree(T_THEIRS, CanonicalTreeParser.class), treeWalk.getTree(T_INDEX, DirCacheBuildIterator.class), hasWorkingTreeIterator ? treeWalk.getTree(T_FILE, WorkingTreeIterator.class) : null, - ignoreConflicts, new Attributes()); + ignoreConflicts, hasAttributeNodeProvider ? treeWalk.getAttributes() : new Attributes()); } /** -- 2.11.4.GIT