Example usage for org.eclipse.jgit.api CleanCommand setDryRun

List of usage examples for org.eclipse.jgit.api CleanCommand setDryRun

Introduction

In this page you can find the example usage for org.eclipse.jgit.api CleanCommand setDryRun.

Prototype

public CleanCommand setDryRun(boolean dryRun) 

Source Link

Document

If dryRun is set, the paths in question will not actually be deleted.

Usage

From source file:com.rimerosolutions.ant.git.tasks.CleanTask.java

License:Apache License

@Override
public void doExecute() {
    try {//  w w  w. ja  v a 2 s. c o  m
        CleanCommand cleanCommand = git.clean();

        if (!pathList.isEmpty()) {
            cleanCommand.setPaths(pathList);
        }

        cleanCommand.setDryRun(dryRun).setIgnore(ignore).setCleanDirectories(cleanDirectories).call();
    } catch (Exception e) {
        throw new GitBuildException("Unexpected exception: " + e.getMessage(), e);
    }
}