aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2018-06-26 08:24:12 +0200
committerThomas Wolf <thomas.wolf@paranor.ch>2018-06-26 08:26:38 +0200
commitf508a0017612af4f5d614417fe29cc23c1860a33 (patch)
tree4a89ba9cd243037fdeb176c5f4e69f5d018a6064
parentf40b39345cd9b54473ee871bff401fe3d394ffe3 (diff)
downloadjgit-f508a0017612af4f5d614417fe29cc23c1860a33.tar.gz
jgit-f508a0017612af4f5d614417fe29cc23c1860a33.zip
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 <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.jgit/src/org/eclipse/jgit/api/CleanCommand.java2
1 files changed, 1 insertions, 1 deletions
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<Set<String>> {
} catch (IOException e) {
throw new JGitInternalException(e.getMessage(), e);
} finally {
- if (!files.isEmpty()) {
+ if (!dryRun && !files.isEmpty()) {
repo.fireEvent(new WorkingTreeModifiedEvent(null, files));
}
}