~radicle-link/dev

2 2

Should lnk-identities::git::clone create multiple branches?

Details
Message ID
<9b421898-8ff3-9e55-88d9-fe45e9b7f284@server.ky>
DKIM signature
missing
Download raw message
Hi,

I noticed lnk-identities' git::clone function creates a repository with 
multiple local branches.  Should this be the case?

My expectation is to mirror git-clone's behavior which by default 
creates one local branch for the project's default branch i.e. 'master'.

Thanks,

SlackCoder
Details
Message ID
<CM7L5UV0MSU3.LTUCTPR7ASDC@haptop>
In-Reply-To
<9b421898-8ff3-9e55-88d9-fe45e9b7f284@server.ky> (view parent)
DKIM signature
missing
Download raw message
On Tue Aug 16, 2022 at 5:03 PM IST, Slack Coder wrote:
> Hi,
>
> I noticed lnk-identities' git::clone function creates a repository with 
> multiple local branches.  Should this be the case?
>
> My expectation is to mirror git-clone's behavior which by default 
> creates one local branch for the project's default branch i.e. 'master'.
>
> Thanks,
>
> SlackCoder

This cloning command is to essentially "clone" what's represented in
the monorepo for that project and make an exact working copy in the
directory you're cloning to. I suppose it can be thought of as a clone
and fetch.
Details
Message ID
<0fc661ad-6446-2c63-15a9-f137abe6de52@server.ky>
In-Reply-To
<CM7L5UV0MSU3.LTUCTPR7ASDC@haptop> (view parent)
DKIM signature
missing
Download raw message
> This cloning command is to essentially "clone" what's represented in
> the monorepo for that project and make an exact working copy in the
> directory you're cloning to. I suppose it can be thought of as a clone
> and fetch.
Would following git-clones behavior not be better or more accurate?

Git-clone does the same thing, except the view is different (unless the 
--mirror option is used).  All local branches on the remote are copied 
to the cloned project as remote tracking branches listed under 'git 
branch -r'.  Keeping these as remote branches would reduce duplication 
and is more in line with expectations of people coming from git.

I am working on radicle-cli, and we're relying on clone via the 
lnk-identities::checkout.  Maybe there's a better route?  The additional 
local branches will be unnecessary for most end users, just pushing 
active contributors to delete them after.
Reply to thread Export thread (mbox)