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

[PATCH v3 2/2] cache-tree: remove dead i-t-a code in verify_cache()

From
Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Date
Dec 13, 2012, 01:39 UTC
Message-ID
<1355362747-13474-2-git-send-email-pclouds@gmail.com>
In-Reply-To
<1355362747-13474-1-git-send-email-pclouds@gmail.com>

This code is added in 331fcb5 (git add --intent-to-add: do not let an empty blob be committed by accident - 2008-11-28) to forbid committing when i-t-a entries are present. When we allow that, we forgot to remove this unreachable code.

Noticed-by: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
---
 cache-tree.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/cache-tree.c b/cache-tree.c
index 1fbc81a..3e79e27 100644
--- a/cache-tree.c
+++ b/cache-tree.c
@@ -166,12 +166,8 @@ static int verify_cache(struct cache_entry **cache,
 				fprintf(stderr, "...\n");
 				break;
 			}
-			if (ce_stage(ce))
-				fprintf(stderr, "%s: unmerged (%s)\n",
-					ce->name, sha1_to_hex(ce->sha1));
-			else
-				fprintf(stderr, "%s: not added yet\n",
-					ce->name);
+			fprintf(stderr, "%s: unmerged (%s)\n",
+				ce->name, sha1_to_hex(ce->sha1));
 		}
 	}
 	if (funny)
-- 
1.8.0.rc2.23.g1fb49df
Previous: Nguyễn Thái Ngọc DuyNext: Junio C Hamano
Message 13 of 16 in “Bug: write-tree corrupts intent-to-add index state”
  1. Jonathon MahNov 6, 2012
  2. Nguyen Thai Ngoc DuyNov 6, 2012
  3. cache-tree: invalidate i-t-a paths after writing treesNguyễn Thái Ngọc Duy, Nov 9, 2012
  4. Junio C HamanoNov 9, 2012
  5. Nguyen Thai Ngoc DuyNov 10, 2012
  6. Junio C HamanoNov 30, 2012
  7. Nguyen Thai Ngoc DuyNov 30, 2012
  8. cache-tree: invalidate i-t-a paths after generating treesNguyễn Thái Ngọc Duy, Dec 8, 2012
  9. Junio C HamanoDec 10, 2012
  10. Nguyen Thai Ngoc DuyDec 10, 2012
  11. Junio C HamanoDec 10, 2012
  12. 1/2 cache-tree: invalidate i-t-a paths after generating treesNguyễn Thái Ngọc Duy, Dec 13, 2012
  13. 2/2 cache-tree: remove dead i-t-a code in verify_cache()Nguyễn Thái Ngọc Duy, Dec 13, 2012
  14. Junio C HamanoDec 13, 2012
  15. Junio C HamanoDec 13, 2012
  16. Nguyen Thai Ngoc DuyDec 15, 2012

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.