From f508a0017612af4f5d614417fe29cc23c1860a33 Mon Sep 17 00:00:00 2001 From: Thomas Wolf Date: Tue, 26 Jun 2018 08:24:12 +0200 Subject: [PATCH] CleanCommand: don't fire WorkingTreeModifiedEvent on dry run Since no files are actually deleted it makes no sense to fire such an event. Change-Id: I66e87afc1791f27fddaa873bafe8bb8b61662535 Signed-off-by: Thomas Wolf --- org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java b/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java index 0d9fe41afb..43085dc775 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java @@ -136,7 +136,7 @@ public class CleanCommand extends GitCommand> { } catch (IOException e) { throw new JGitInternalException(e.getMessage(), e); } finally { - if (!files.isEmpty()) { + if (!dryRun && !files.isEmpty()) { repo.fireEvent(new WorkingTreeModifiedEvent(null, files)); } } -- 2.39.5