Skip to content

Idiomatic way of specifying --single-branch argument #285

Open
@am11

Description

@am11

Hello, AFAIK, the fastest way to clone just a single branch of a huge repository requires the following arguments:

git clone $REPO_URL   \
  --branch $BRANCH    \
  --depth 1           \
  --single-branch

With with: fetch-depth: 1, we get --depth 1, but I could not find a way to specify the last argument --single-branch, which skips fetching details of all branches except for the one specified by --branch (or default branch, if --branch or -b was skipped). Without --single-branch, it means "get depth 1 of all branches", and in case there are many (100+) branches, it is a sheer waste of time and resource for those who are interested in just one branch during the build (i.e. a common use-case).

Is there an idiomatic way to specify it? If not, please consider it for the future version.

Cheers!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions