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

[PATCH] pack-objects: don't include missing preferred base objects

From
Nicolas Pitre <nico@cam.org>
Date
Sep 2, 2008, 14:22 UTC
Message-ID
<1220365342-21308-2-git-send-email-nico@cam.org>
In-Reply-To
<1220365342-21308-1-git-send-email-nico@cam.org>

This improves commit 6d6f9cddbe a bit by simply not including missing bases in the list of objects to process at all.

Signed-off-by: Nicolas Pitre <nico@cam.org>
---
 builtin-pack-objects.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c
index ba2cf00..e16b7e8 100644
--- a/builtin-pack-objects.c
+++ b/builtin-pack-objects.c
@@ -1725,6 +1725,14 @@ static void prepare_pack(int window, int depth)
 			if (entry->type < 0)
 				die("unable to get type of object %s",
 				    sha1_to_hex(entry->idx.sha1));
+		} else {
+			if (entry->type < 0) {
+				/*
+				 * This object is not found, but we
+				 * don't have to include it anyway.
+				 */
+				continue;
+			}
 		}
 
 		delta_list[n++] = entry;
-- 
1.6.0.1.276.g59b81
Previous: Nicolas PitreNext: Nicolas Pitre
Message 2 of 3 in “sha1write: don't copy full sized buffers”
  1. sha1write: don't copy full sized buffersNicolas Pitre, Sep 2, 2008
  2. pack-objects: don't include missing preferred base objectsNicolas Pitre, Sep 2, 2008
  3. t5300: improve SHA1 collision testNicolas Pitre, Sep 2, 2008

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.