Re: [PATCHv6 5/7] worktree: add function to check if worktrees are in use

2016-12-08 Thread Stefan Beller
On Thu, Dec 8, 2016 at 2:51 AM, Duy Nguyen wrote: > On Thu, Dec 8, 2016 at 5:40 PM, Duy Nguyen wrote: >> Alternatively, we could add a new flag to get_worktrees() to tell it >> to return all worktrees if there is a least one linked worktree, or >> return NULL if there's only main worktree. I'm no

Re: [PATCHv6 5/7] worktree: add function to check if worktrees are in use

2016-12-08 Thread Duy Nguyen
On Thu, Dec 8, 2016 at 5:40 PM, Duy Nguyen wrote: > Alternatively, we could add a new flag to get_worktrees() to tell it > to return all worktrees if there is a least one linked worktree, or > return NULL if there's only main worktree. I'm not sure if this is > clever or very stupid. No, this may

Re: [PATCHv6 5/7] worktree: add function to check if worktrees are in use

2016-12-08 Thread Duy Nguyen
On Thu, Dec 8, 2016 at 8:46 AM, Stefan Beller wrote: > Signed-off-by: Stefan Beller > --- > worktree.c | 24 > worktree.h | 7 +++ > 2 files changed, 31 insertions(+) > > diff --git a/worktree.c b/worktree.c > index 75db689672..2559f33846 100644 > --- a/worktree.c >

[PATCHv6 5/7] worktree: add function to check if worktrees are in use

2016-12-07 Thread Stefan Beller
Signed-off-by: Stefan Beller --- worktree.c | 24 worktree.h | 7 +++ 2 files changed, 31 insertions(+) diff --git a/worktree.c b/worktree.c index 75db689672..2559f33846 100644 --- a/worktree.c +++ b/worktree.c @@ -406,3 +406,27 @@ const struct worktree *find_shared