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

[PATCH 3/3] suppress errors on missing UNINTERESTING links

From
Jeff King <peff@peff.net>
Date
Jun 1, 2015, 09:56 UTC
Message-ID
<20150601095640.GC31389@peff.net>
In-Reply-To
<20150601095410.GA16976@peff.net>

When we are traversing commit parents along the UNINTERESTING side of a revision walk, we do not care if the parent turns out to be missing. That lets us limit traversals using unreachable and possibly incomplete sections of history. However, we do still print error messages about the missing commits; this patch suppresses the error, as well.

Signed-off-by: Jeff King <peff@peff.net>
---
 revision.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/revision.c b/revision.c
index 29e5143..0b322b4 100644
--- a/revision.c
+++ b/revision.c
@@ -817,7 +817,7 @@ static int add_parents_to_list(struct rev_info *revs, struct commit *commit,
 			parent = parent->next;
 			if (p)
 				p->object.flags |= UNINTERESTING;
-			if (parse_commit(p) < 0)
+			if (parse_commit_gently(p, 1) < 0)
 				continue;
 			if (p->parents)
 				mark_parents_uninteresting(p);
-- 
2.4.2.690.g2a79674
Previous: Jeff KingNext: Junio C Hamano
Message 12 of 15 in “git gc gives "error: Could not read..."”
  1. Stefan NäweJun 1, 2015
  2. Jeff KingJun 1, 2015
  3. Stefan NäweJun 1, 2015
  4. Jeff KingJun 1, 2015
  5. Stefan NäweJun 1, 2015
  6. Jeff KingJun 1, 2015
  7. Stefan NäweJun 1, 2015
  8. Jeff KingJun 1, 2015
  9. 0/3 silence missing-link warnings in some casesJeff King, Jun 1, 2015
  10. 1/3 add quieter versions of parse_{tree,commit}Jeff King, Jun 1, 2015
  11. 2/3 silence broken link warnings with revs->ignore_missing_linksJeff King, Jun 1, 2015
  12. 3/3 suppress errors on missing UNINTERESTING linksJeff King, Jun 1, 2015
  13. Junio C HamanoJun 1, 2015
  14. Jeff KingJun 1, 2015
  15. Junio C HamanoJun 1, 2015

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.