import org.eclipse.jgit.lib.Config.SectionParser;
import org.eclipse.jgit.lib.Constants;
import org.eclipse.jgit.lib.MutableObjectId;
+import org.eclipse.jgit.lib.NullProgressMonitor;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.ObjectInserter;
import org.eclipse.jgit.lib.ProgressMonitor;
private boolean noDone;
+ private boolean noProgress;
+
private String lockMessage;
private PackLock packLock;
* Execute common ancestor negotiation and fetch the objects.
*
* @param monitor
- * progress monitor to receive status updates.
+ * progress monitor to receive status updates. If the monitor is
+ * the {@link NullProgressMonitor#INSTANCE}, then the no-progress
+ * option enabled.
* @param want
* the advertised remote references the caller wants to fetch.
* @param have
final Collection<Ref> want, final Set<ObjectId> have,
OutputStream outputStream) throws TransportException {
try {
+ noProgress = monitor == NullProgressMonitor.INSTANCE;
+
markRefsAdvertised();
markReachable(have, maxTimeWanted(want));
private String enableCapabilities() throws TransportException {
final StringBuilder line = new StringBuilder();
+ if (noProgress)
+ wantCapability(line, OPTION_NO_PROGRESS);
if (includeTags)
includeTags = wantCapability(line, OPTION_INCLUDE_TAG);
if (allowOfsDelta)