git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] Allow monitor/unintersting objects to be null
@ 2009-05-06 20:37 Alex Blewitt
  2009-05-06 20:37 ` [PATCH 2/2] Use NullProgressMonitor.INSTANCE and indent for loop Alex Blewitt
  2009-05-06 21:10 ` [PATCH 1/2] Allow monitor/unintersting objects to be null Robin Rosenberg
  0 siblings, 2 replies; 8+ messages in thread
From: Alex Blewitt @ 2009-05-06 20:37 UTC (permalink / raw)
  To: spearce, robin.rosenberg; +Cc: git, Alex Blewitt

---
 .../src/org/spearce/jgit/lib/PackWriter.java       |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java b/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java
index ea63942..3d7004d 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/lib/PackWriter.java
@@ -230,8 +230,8 @@ public PackWriter(final Repository repo, final ProgressMonitor monitor) {
 	public PackWriter(final Repository repo, final ProgressMonitor imonitor,
 			final ProgressMonitor wmonitor) {
 		this.db = repo;
-		initMonitor = imonitor;
-		writeMonitor = wmonitor;
+		initMonitor = (imonitor == null ? new NullProgressMonitor() : imonitor);
+		writeMonitor = (wmonitor == null ? new NullProgressMonitor() : wmonitor);
 		this.deflater = new Deflater(db.getConfig().getCore().getCompression());
 		outputVersion = repo.getConfig().getCore().getPackIndexVersion();
 	}
@@ -829,6 +829,7 @@ private ObjectWalk setUpWalker(
 			RevObject o = walker.parseAny(id);
 			walker.markStart(o);
 		}
+		if (uninterestingObjects != null)
 		for (ObjectId id : uninterestingObjects) {
 			final RevObject o;
 			try {
-- 
1.6.2.2

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2009-05-06 21:29 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-06 20:37 [PATCH 1/2] Allow monitor/unintersting objects to be null Alex Blewitt
2009-05-06 20:37 ` [PATCH 2/2] Use NullProgressMonitor.INSTANCE and indent for loop Alex Blewitt
2009-05-06 20:41   ` Shawn O. Pearce
2009-05-06 20:48   ` Shawn O. Pearce
2009-05-06 20:50     ` Alex Blewitt
2009-05-06 20:54       ` Shawn O. Pearce
2009-05-06 21:10 ` [PATCH 1/2] Allow monitor/unintersting objects to be null Robin Rosenberg
2009-05-06 21:28   ` Alex Blewitt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).