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

2017-05-16 Thread manish . earth
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

[PATCH 1/2] refs: Add for_each_worktree_ref for iterating over all worktree HEADs

2017-05-16 Thread manish . earth
From: Manish Goregaokar To ensure that `git prune` does not remove refs checked out in other worktrees, we need to include these HEADs in the set of roots. This adds the iteration function necessary to do this. Signed-off-by: Manish Goregaokar --- refs.c | 16 refs.h | 1 + 2