Community
Participate
Working Groups
In a tool like eclipse it is a good usability standard to show the progress of a long running task to the user. Additionaly a long running task should be cancelable. When egit now uses the commands of the jgit porcelain API there should be a possibility to be notified about progress. Maybe a kind of ProgressMonitor like in eclipse could be added to a command via an additional builder method addProgressMonitor(progressMonitor). Another option would be to add a new method call(progressMonitor).
I would prefer to just bake it in the call()... seems more intuitive that way and that in reality, I think most people are interested in progress, CLI or not.
There are already classes for this purpose: ProgressMonitor in JGit and EclipseGitProgressTransformer in EGit
*** Bug 331689 has been marked as a duplicate of this bug. ***
What's the status of this? We wanted to use jgit on the command line, but checkout and reset (which can take some time) do not support reporting progress. IMHO, both commands should show progress, just as checkout and fetch do, for example.
The porcelain API (what is underneath org.eclipse.jgit.api) for cloning has this feature. It allows to set ProgressMonitors and EGit makes use of this. When you clone a repo with EGit then the progress is reported. The porcelain API for checkout does not have this feature. I agree, that should be added. Another thing is whether our command line tools (underneath org.eclipse.jgit.pgm) make use of this possibility. Clone.java has not learned to use the progress monitors to report progress. Yes, that should be added. Could you imagine to contribute? Same for Checkout. But here the underlying command has no support for progress monitors. It has to be added to org.eclipse.jgit.pgm and JGits checkout machinery.
This was implemented recently in https://git.eclipse.org/r/#/c/112855/