package org.jenkinsci.plugins.gitclient;

import hudson.model.TaskListener;

import java.io.PrintStream;

/**
 * @author <a href="mailto:nicolas.deloof@gmail.com">Nicolas De Loof</a>
 */
public class ProgressMonitor implements org.eclipse.jgit.lib.ProgressMonitor {

    private final PrintStream log;
    private int totalTasks;
    private int completed;

    public ProgressMonitor(TaskListener listener) {
        this.log = listener.getLogger();
    }

    public void start(int totalTasks) {
        // not set ?
        this.totalTasks = totalTasks;
    }

    public void beginTask(String title, int totalWork) {
        log.println(title);
    }

    public void update(int completed) {
        this.completed += completed;
    }

    public void endTask() {
    }

    public boolean isCancelled() {
        return Thread.currentThread().isInterrupted();
    }
}

@@ -299,36 +299,8 @@
 og;%0A
-    private int totalTasks;%0A
     
@@ -467,67 +467,8 @@
 ) %7B%0A
-        // not set ?%0A        this.totalTasks = totalTasks;%0A
     

Remove unread field from ProgressMonitor implementation