git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Allow monitor/unintersting objects to be null
@ 2009-05-06 19:57 Alex Blewitt
  2009-05-06 20:02 ` Shawn O. Pearce
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Blewitt @ 2009-05-06 19:57 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 class PackWriter {
 	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 @@ public class PackWriter {
 			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] 2+ messages in thread

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

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-06 19:57 [PATCH] Allow monitor/unintersting objects to be null Alex Blewitt
2009-05-06 20:02 ` Shawn O. Pearce

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).