Re: [PATCH v8 3/4] worktree: add functions to get worktree details

2015-09-22 Thread Junio C Hamano
Michael Rappazzo writes: > +/** > + * get the main worktree > + */ > +static struct worktree *get_main_worktree() static struct worktree *get_main_worktree(void) > +{ > + struct worktree *worktree = NULL; > struct strbuf path = STRBUF_INIT; > + struct strbuf worktree_path = STRBUF

[PATCH v8 3/4] worktree: add functions to get worktree details

2015-09-18 Thread Michael Rappazzo
The worktree structure provided for an individual worktree includes the absolute path, the location of the git dir, the head ref (if not detached), the head revision sha1, whether or not head is detached, and whether or not the worktree is a bare repo. Signed-off-by: Michael Rappazzo --- worktre