CleanCommand parameters are missing

46 views Asked by At

Using NGit I need to run git clean command equivalent to the following CLI command:

git clean -f -d

But there are no such options as force or clean directories in CleanCommand class. What's the best workaround here?

1

There are 1 answers

0
robinst On

JGit (on which NGit is based) supports -d, see the API documentation.

So it seems the best solution would be if NGit updated to the newest JGit release, I'd file a bug for that.

As for a workaround, maybe it is possible to implement this yourself, see the Java implementation of CleanCommand (if NGit provides the necessary lower-level API for this).