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

[PATCH 2/2] reachable: Add HEADs of all worktrees to reachability analysis

From
manish.earth@gmail.com <manish.earth@gmail.com>
Date
May 17, 2017, 00:50 UTC
Message-ID
<20170517005041.46310-2-manishearth@gmail.com>
In-Reply-To
<20170517005041.46310-1-manishearth@gmail.com>
From: Manish Goregaokar <manishearth@gmail.com>
* reachable.c:
  mark_reachable_objects: Include other worktrees
Signed-off-by: Manish Goregaokar <manishearth@gmail.com>
---
 reachable.c | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/reachable.c b/reachable.c
index d0199ca..439708e 100644
--- a/reachable.c
+++ b/reachable.c
@@ -178,6 +178,9 @@ void mark_reachable_objects(struct rev_info *revs, int mark_reflog,
 	/* detached HEAD is not included in the list above */
 	head_ref(add_one_ref, revs);
 
+	/* worktrees are not included in either */
+	for_each_worktree_ref(add_one_ref, revs);
+
 	/* Add all reflog info */
 	if (mark_reflog)
 		add_reflogs_to_pending(revs, 0);
-- 
2.10.1
Previous: manish.earth@gmail.comNext: Manish Goregaokar
Message 5 of 21 in “refs: Add for_each_worktree_ref for iterating over all worktree HEADs”
  1. 1/2 refs: Add for_each_worktree_ref for iterating over all worktree HEADsManish Goregaokar, May 17, 2017
  2. Manish GoregaokarMay 17, 2017
  3. Jonathan NiederMay 17, 2017
  4. 1/2 refs: Add for_each_worktree_ref for iterating over all worktree HEADsmanish.earth@gmail.com, May 17, 2017
  5. 2/2 reachable: Add HEADs of all worktrees to reachability analysismanish.earth@gmail.com, May 17, 2017
  6. Manish GoregaokarMay 17, 2017
  7. Manish GoregaokarMay 17, 2017
  8. Brandon WilliamsMay 18, 2017
  9. Manish GoregaokarMay 18, 2017
  10. 1/2 refs: Add for_each_worktree_ref for iterating over all worktree HEADsmanishearth@gmail.com, May 18, 2017
  11. 2/2 reachable: Add HEADs of all worktrees to reachability analysismanishearth@gmail.com, May 18, 2017
  12. Manish GoregaokarMay 18, 2017
  13. Simon RuderichMay 18, 2017
  14. Samuel LijinMay 18, 2017
  15. Brandon WilliamsMay 18, 2017
  16. Junio C HamanoMay 20, 2017
  17. Manish GoregaokarMay 20, 2017
  18. Junio C HamanoMay 20, 2017
  19. Duy NguyenMay 22, 2017
  20. Manish GoregaokarMay 22, 2017
  21. Duy NguyenMay 25, 2017

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.