Re: [PATCH v2 1/5] worktree.c: add find_worktree_by_path()
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- May 23, 2016, 01:41 UTC
- Message-ID
- <CAPig+cQTWK_yR4hCdMDj35Rwx6tAUXdfzrOkALJU3j6qCBxoew@mail.gmail.com>
- In-Reply-To
- <20160522104341.656-2-pclouds@gmail.com>
On Sun, May 22, 2016 at 6:43 AM, Nguyễn Thái Ngọc Duy <pclouds@gmail.com> wrote:
Show 16 quoted lines
> So far we haven't needed to identify an existing worktree from command > line. Future commands such as lock or move will need it. There are of > course other options for identifying a worktree, for example by branch > or even by internal id. They may be added later if proved useful. > > Helped-by: Eric Sunshine <sunshine@sunshineco.com> > Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com> > --- > diff --git a/worktree.h b/worktree.h > @@ -29,6 +29,12 @@ extern struct worktree **get_worktrees(void); > +/* > + * Search a worktree by its path. Paths are normalized internally. > + */ > +extern struct worktree *find_worktree_by_path(struct worktree **list, > + const char *path_); > +
Sorry for not noticing last time, but I'd probably have named this argument 'path' rather than 'path_' here in the header.
Not worth a re-roll, of course.