Skip to content

docs(scm): document singleBranch/depth performance option - #3514

Merged
olblak merged 3 commits into
updatecli:masterfrom
kuisathaverat:docs/singlebranch-scm-checkout-performance
Aug 6, 2026
Merged

docs(scm): document singleBranch/depth performance option#3514
olblak merged 3 commits into
updatecli:masterfrom
kuisathaverat:docs/singlebranch-scm-checkout-performance

Conversation

@kuisathaverat

Copy link
Copy Markdown
Contributor

Problem

updatecli/updatecli#9590 introduces a new opt-in depth + singleBranch combination for git-based scm plugins (github, gitlab, gitea, bitbucket, stash, azuredevops, git) that lets Updatecli skip fetching every branch, tag, and ref on the remote during checkout. On repositories with hundreds of branches/tags and hundreds of thousands of commits, this reduced checkout time from ~19 minutes to ~43 seconds.

The parameter reference table on each scm doc page ({{< resourceparameters "scms" "..." >}}) is auto-generated from the JSON schema in content/en/schema/latest/policy/manifest/config.json, which is refreshed automatically by the jsonschema pipeline (updatecli/updatecli.d/jsonschema.yaml) once a new Updatecli release ships with the field. That part requires no manual change here.

However, none of the scm doc pages had prose/examples explaining why and how to use this option, so users are unlikely to discover it.

Solution

Added a new "Performance on large repositories" subsection to each of the 7 affected scm doc pages:

  • content/en/docs/plugins/scm/github.adoc
  • content/en/docs/plugins/scm/gitlab.adoc
  • content/en/docs/plugins/scm/gitea.adoc
  • content/en/docs/plugins/scm/bitbucket.adoc
  • content/en/docs/plugins/scm/stash.adoc
  • content/en/docs/plugins/scm/azuredevops.adoc
  • content/en/docs/plugins/scm/git.adoc

Each subsection explains:

  • The default behavior (fetching every ref) and why it's slow on large repos.
  • How depth: 1 + singleBranch: true scopes the checkout to just the configured branch.
  • A trade-off callout (NOTE:) about reduced visibility into other branches/tags when enabled (e.g. duplicate-PR detection).

A corresponding runnable example yaml file was added for each plugin under assets/code_example/docs/plugins/..., following the same include pattern already used by the existing "Default"/"CommitMessage" examples on each page.

Related

kuisathaverat and others added 3 commits July 15, 2026 00:04
Adds a new 'Performance on large repositories' subsection to each scm
plugin doc (github, gitlab, gitea, bitbucket, stash, azuredevops, git)
explaining the new singleBranch option (paired with depth) that lets
Updatecli skip fetching every branch, tag, and ref on the remote,
along with a runnable example for each plugin.

Related to updatecli/updatecli#9590.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@olblak

olblak commented Aug 6, 2026

Copy link
Copy Markdown
Member

I slightly modified the pullrequest as part of it was already documented when working on #3597

@olblak
olblak enabled auto-merge (squash) August 6, 2026 11:36
@olblak
olblak merged commit 612ebf8 into updatecli:master Aug 6, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants