Re: [PATCH v4 11/16] revision.c: --all adds HEAD from all worktrees

2017-09-09 Thread Michael Haggerty
On 08/23/2017 02:36 PM, Nguyễn Thái Ngọc Duy wrote: > [...] > diff --git a/revision.c b/revision.c > index 8d04516266..0e98444857 100644 > --- a/revision.c > +++ b/revision.c > @@ -2133,6 +2133,14 @@ static int handle_revision_pseudo_opt(const char > *submodule, > int argcount; > >

Re: [PATCH v4 11/16] revision.c: --all adds HEAD from all worktrees

2017-09-06 Thread Stefan Beller
On Wed, Sep 6, 2017 at 4:19 AM, Duy Nguyen wrote: > > So, probably no worktree iterator (yet). Ok, thanks for considering it.

Re: [PATCH v4 11/16] revision.c: --all adds HEAD from all worktrees

2017-09-06 Thread Duy Nguyen
On Thu, Aug 24, 2017 at 2:54 AM, Stefan Beller wrote: >> +int other_head_refs(each_ref_fn fn, void *cb_data) >> +{ >> + struct worktree **worktrees, **p; >> + int ret = 0; >> + >> + worktrees = get_worktrees(0); >> + for (p = worktrees; *p; p++) { >> +

Re: [PATCH v4 11/16] revision.c: --all adds HEAD from all worktrees

2017-08-23 Thread Stefan Beller
> +int other_head_refs(each_ref_fn fn, void *cb_data) > +{ > + struct worktree **worktrees, **p; > + int ret = 0; > + > + worktrees = get_worktrees(0); > + for (p = worktrees; *p; p++) { > + struct worktree *wt = *p; > + struct ref_store *refs; >

[PATCH v4 11/16] revision.c: --all adds HEAD from all worktrees

2017-08-23 Thread Nguyễn Thái Ngọc Duy
Unless single_worktree is set, --all now adds HEAD from all worktrees. Since reachable.c code does not use setup_revisions(), we need to call other_head_refs_submodule() explicitly there to have the same effect on "git prune", so that we won't accidentally delete objects needed by some other