Open
Description
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
Labels
No labels