Eric Sunshine writes:
> Making the last entry a NULL means get_worktrees() would have to
> return an array of pointers rather than an array of structures, which
> is more syntactically noisy, and complex since it's harder to reason
> about pointer-to-pointer. In my mind, at least, the simplicity
On Wed, Sep 16, 2015 at 4:49 PM, Mike Rappazzo wrote:
> On Wed, Sep 16, 2015 at 4:32 PM, Eric Sunshine
> wrote:
>> On Mon, Sep 14, 2015 at 8:20 AM, Mike Rappazzo wrote:
>>> On Sat, Sep 12, 2015 at 10:39 PM, Eric Sunshine
>>> wrote:
I don't care too strongly, but an alternate approach (wh
On Wed, Sep 16, 2015 at 4:32 PM, Eric Sunshine wrote:
> On Mon, Sep 14, 2015 at 8:20 AM, Mike Rappazzo wrote:
>> On Sat, Sep 12, 2015 at 10:39 PM, Eric Sunshine
>> wrote:
+struct worktree {
+ char *path;
+ char *git_dir;
+ char *head_ref;
+ unsig
On Mon, Sep 14, 2015 at 1:41 PM, Junio C Hamano wrote:
> Mike Rappazzo writes:
>> On Sat, Sep 12, 2015 at 10:39 PM, Eric Sunshine
>> wrote:
+struct worktree_list *get_worktree_list()
>>>
>>> Can we be more concise and call this get_worktrees()?
>>
>> I prefer 'get_worktree_list' because I
On Mon, Sep 14, 2015 at 8:20 AM, Mike Rappazzo wrote:
> On Sat, Sep 12, 2015 at 10:39 PM, Eric Sunshine
> wrote:
>>> +struct worktree {
>>> + char *path;
>>> + char *git_dir;
>>> + char *head_ref;
>>> + unsigned char head_sha1[20];
>>> + int is_detached;
>>> +
Mike Rappazzo writes:
> On Sat, Sep 12, 2015 at 10:39 PM, Eric Sunshine
> wrote:
>>> +struct worktree_list *get_worktree_list()
>>
>> Can we be more concise and call this get_worktrees()?
>
> I prefer 'get_worktree_list' because I also added the 'get_worktree'
> function, and I wanted to differ
On Sat, Sep 12, 2015 at 10:39 PM, Eric Sunshine wrote:
> I realize that this is modeled closely after existing code in
> branch.c, but, with the exception of parsing the ref file and
> constructing a worktree structure, the main worktree case (id == NULL)
> is entirely disjoint from the linked wor
On Sat, Sep 12, 2015 at 10:39 PM, Eric Sunshine wrote:
> On Fri, Sep 4, 2015 at 5:39 PM, Michael Rappazzo wrote:
>> + }
>> + } else if (strbuf_read_file(ref, path_to_ref, 0) >= 0) {
>> + if (starts_with(ref->buf, "ref:")) {
>> + strbuf_remov
On Fri, Sep 4, 2015 at 5:39 PM, Michael Rappazzo wrote:
> Including functions to get the list of all worktrees, and to get
> a specific worktree (primary or linked).
Some comments below in addition to those by Junio...
> Signed-off-by: Michael Rappazzo
> ---
> diff --git a/worktree.c b/worktree
On Thu, Sep 10, 2015 at 4:04 PM, Junio C Hamano wrote:
> Michael Rappazzo writes:
>
>> Including functions to get the list of all worktrees, and to get
>> a specific worktree (primary or linked).
>
> Was this meant as a continuation of the sentence started on the
> Subject line, or is s/Including
Michael Rappazzo writes:
> Including functions to get the list of all worktrees, and to get
> a specific worktree (primary or linked).
Was this meant as a continuation of the sentence started on the
Subject line, or is s/Including/Include/ necessary?
> diff --git a/worktree.c b/worktree.c
> new
Including functions to get the list of all worktrees, and to get
a specific worktree (primary or linked).
Signed-off-by: Michael Rappazzo
---
Makefile | 1 +
worktree.c | 157 +
worktree.h | 48 +++
3 files changed,
12 matches
Mail list logo