From: manish.earth@gmail.com Date: Wed, 17 May 2017 00:50:41 GMT Subject: [PATCH 2/2] reachable: Add HEADs of all worktrees to reachability analysis Message-ID: <20170517005041.46310-2-manishearth@gmail.com> In-Reply-To: <20170517005041.46310-1-manishearth@gmail.com> From: Manish Goregaokar * reachable.c: mark_reachable_objects: Include other worktrees Signed-off-by: Manish Goregaokar --- 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