Re: [PATCH v2 1/2] ref-filter: add worktree atom

2018-11-21 Thread Jeff King
On Wed, Nov 21, 2018 at 03:05:04PM +0100, Nickolai Belakovski wrote: > I think if we move to making this atom just store worktree path, that > needs to be implemented as a hashmap of refname->wtpath, which would > also solve this string_list issue, correct? Just making sure I'm not > missing

Re: [PATCH v2 1/2] ref-filter: add worktree atom

2018-11-21 Thread Nickolai Belakovski
I think if we move to making this atom just store worktree path, that needs to be implemented as a hashmap of refname->wtpath, which would also solve this string_list issue, correct? Just making sure I'm not missing something before I submit another patch. On Tue, Nov 13, 2018 at 2:38 AM Junio C

Re: [PATCH v2 1/2] ref-filter: add worktree atom

2018-11-12 Thread Junio C Hamano
Jeff King writes: >> I wonder if "The worktree at /local/src/wt1 has this branch checked >> out" is something the user of %(worktree) atom, or a variant thereof >> e.g. "%(worktree:detailed)", may want to learn, but because that >> information is lost when this function returns, such an

Re: [PATCH v2 1/2] ref-filter: add worktree atom

2018-11-12 Thread Jeff King
On Sun, Nov 11, 2018 at 03:58:30PM -0800, nbelakov...@gmail.com wrote: > From: Nickolai Belakovski > > Add an atom expressing whether the particular ref is checked out in a > linked worktree. > > Signed-off-by: Nickolai Belakovski > --- > ref-filter.c | 31

Re: [PATCH v2 1/2] ref-filter: add worktree atom

2018-11-12 Thread Jeff King
On Mon, Nov 12, 2018 at 07:11:23PM +0900, Junio C Hamano wrote: > > + } > > + > > + string_list_sort(>u.worktree_heads); > > + > > + free_worktrees(worktrees); > > + return 0; > > +} > > So..., this function collects any and all branches that are checked > out in some worktree, and sort

Re: [PATCH v2 1/2] ref-filter: add worktree atom

2018-11-12 Thread Junio C Hamano
nbelakov...@gmail.com writes: > > +static int worktree_head_atom_parser(const struct ref_format *format, > + struct > used_atom *atom, > + const > char

[PATCH v2 1/2] ref-filter: add worktree atom

2018-11-11 Thread nbelakovski
From: Nickolai Belakovski Add an atom expressing whether the particular ref is checked out in a linked worktree. Signed-off-by: Nickolai Belakovski --- ref-filter.c | 31 +++ t/t6302-for-each-ref-filter.sh | 15 +++ 2 files changed, 46