From e8c361906335c439fe8ce0e596c9ad58401ceed8 Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Sun, 3 Nov 2019 10:14:40 +0100 Subject: [PATCH] DirCacheCheckout: don't use deprecated method Pass the CheckoutMetadata to checkoutEntry(), otherwise cr-lf settings and smudge filters would be ignored. Change-Id: Ifb1c4cb098a0b47c9752d0231d530db6a92b25a4 Signed-off-by: Thomas Wolf --- .../src/org/eclipse/jgit/dircache/DirCacheCheckout.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java index 1faeff2ab..bbaed3766 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/dircache/DirCacheCheckout.java @@ -1243,9 +1243,12 @@ public class DirCacheCheckout { if (e != null && !FileMode.TREE.equals(e.getFileMode())) builder.add(e); if (force) { - if (f.isModified(e, true, this.walk.getObjectReader())) { + if (f.isModified(e, true, walk.getObjectReader())) { kept.add(path); - checkoutEntry(repo, e, this.walk.getObjectReader()); + checkoutEntry(repo, e, walk.getObjectReader(), false, + new CheckoutMetadata(walk.getEolStreamType(CHECKOUT_OP), + walk.getFilterCommand( + Constants.ATTR_FILTER_TYPE_SMUDGE))); } } }