git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 1/2] Allow monitor/unintersting objects to be null

From
Alex Blewitt <alex.blewitt@gmail.com>
Date
May 6, 2009, 20:37 UTC
Message-ID
<1241642224-6914-1-git-send-email-alex.blewitt@gmail.com>
---
 .../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
Next: Alex Blewitt
Message 1 of 8 in “Allow monitor/unintersting objects to be null”
  1. 1/2 Allow monitor/unintersting objects to be nullAlex Blewitt, May 6, 2009
  2. 2/2 Use NullProgressMonitor.INSTANCE and indent for loopAlex Blewitt, May 6, 2009
  3. Shawn O. PearceMay 6, 2009
  4. Shawn O. PearceMay 6, 2009
  5. Alex BlewittMay 6, 2009
  6. Shawn O. PearceMay 6, 2009
  7. Robin RosenbergMay 6, 2009
  8. Alex BlewittMay 6, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.