Re: What's cooking in git.git (Nov 2022, #03; Mon, 14)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Nov 14, 2022 at 11:53 PM Taylor Blau <me@xxxxxxxxxxxx> wrote:
> * ja/worktree-orphan (2022-11-10) 2 commits
>  - worktree add: add --orphan flag
>  - worktree add: Include -B in usage docs
>
>  'git worktree add' learned how to create a worktree based on an
>  orphaned branch with `--orphan`.
>
>  Waiting for review discussion to settle, but leaning negative.
>  source: <20221110233137.10414-1-jacobabel@xxxxxxxxxx>

I haven't had a chance yet to look at Jacob's v3, but this series does
close a gap in worktree usability[*], and v3 addresses a stated
concern of mine against earlier iterations, so I think a "negative
lean" may not be warranted.

[*] In particular, it is currently impossible to create a worktree
from a brand new bare repository:

    % git init --bare foo.git
    % git -C foo.git worktree add -b main bar
    Preparing worktree (new branch 'main')
    fatal: not a valid object name: 'HEAD'
    %

whereas, with this patch series:

    % git init --bare foo.git
    % git -C foo.git worktree add --orphan main bar
    Preparing worktree (new branch 'main')
    %

(The commit message can probably be improved to spell this out since
it wasn't obvious to me, simply from reading the commit message, that
this problem existed.)



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux