diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2011-11-17 07:21:22 -0800 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2011-11-18 15:55:51 -0800 |
commit | 29997ab0840dbac89106691264c7768de6d47322 (patch) | |
tree | 65df24a6f69e8aede1766bbeac7532d9f3bb361b | |
parent | 4b84186b641ddef39399dfff58bc762090da8fdd (diff) | |
download | jgit-29997ab0840dbac89106691264c7768de6d47322.tar.gz jgit-29997ab0840dbac89106691264c7768de6d47322.zip |
Correct progress monitor on "Getting sizes:" phase
This counter always was running 1 higher, because it incremented
after the queue was exhausted (and every object was processed). Move
increments to be after the queue has provided a result, to ensure
we do not show a higher in-progress count than total count.
Change-Id: I97f815a0492c0957300475af409b6c6260008463
-rw-r--r-- | org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java index 95fc7a9e5e..f088d3224c 100644 --- a/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java +++ b/org.eclipse.jgit/src/org/eclipse/jgit/storage/pack/PackWriter.java @@ -1041,12 +1041,11 @@ public class PackWriter { try { final long limit = config.getBigFileThreshold(); for (;;) { - monitor.update(1); - try { if (!sizeQueue.next()) break; } catch (MissingObjectException notFound) { + monitor.update(1); if (ignoreMissingUninteresting) { ObjectToPack otp = sizeQueue.getCurrent(); if (otp != null && otp.isEdge()) { @@ -1076,6 +1075,7 @@ public class PackWriter { else otp.setWeight((int) sz); + monitor.update(1); } } finally { sizeQueue.release(); |