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

[PATCH v4 3/4] index-pack: remove dead code (it should never happen)

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
May 26, 2013, 01:16 UTC
Message-ID
<1369530977-12746-4-git-send-email-pclouds@gmail.com>
In-Reply-To
<1369530977-12746-1-git-send-email-pclouds@gmail.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 builtin/index-pack.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/builtin/index-pack.c b/builtin/index-pack.c
index 79dfe47..f52a04f 100644
--- a/builtin/index-pack.c
+++ b/builtin/index-pack.c
@@ -747,8 +747,7 @@ static void sha1_object(const void *data, struct object_entry *obj_entry,
 			int eaten;
 			void *buf = (void *) data;
 
-			if (!buf)
-				buf = new_data = get_data_from_pack(obj_entry);
+			assert(data && "data can only be NULL for large _blobs_");
 
 			/*
 			 * we do not need to free the memory here, as the
-- 
1.8.2.83.gc99314b
Previous: Nguyễn Thái Ngọc DuyNext: Nguyễn Thái Ngọc Duy
Message 4 of 5 in “nd/clone-connectivity-shortcut updates”
  1. 0/4 nd/clone-connectivity-shortcut updatesNguyễn Thái Ngọc Duy, May 26, 2013
  2. 1/4 clone: let the user know when check_everything_connected is runNguyễn Thái Ngọc Duy, May 26, 2013
  3. 2/4 fetch-pack: prepare updated shallow file before fetching the packNguyễn Thái Ngọc Duy, May 26, 2013
  4. 3/4 index-pack: remove dead code (it should never happen)Nguyễn Thái Ngọc Duy, May 26, 2013
  5. 4/4 clone: open a shortcut for connectivity checkNguyễn Thái Ngọc Duy, May 26, 2013

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.