0

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?

alexey
  • 8,360
  • 14
  • 70
  • 102

1 Answers1

0

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).

robinst
  • 30,027
  • 10
  • 102
  • 108