From 622a5bf9c2937fbfc631ccc30d5debf74010361d Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Thu, 11 Dec 2025 17:24:49 -0500 Subject: [PATCH] init: change --manifest-depth default to 1 Most users do not care about the manifest history in .repo/manifests/. Let's change the default to 1 so things work smoothly for most people most of the time. For the rare folks who want the full history, they can add --manifest-depth=0 to their `repo init`. This has no effect on existing checkouts. Spot checking Android & CrOS manifests shows significant speedups. Full history can take O(10's seconds) to O(minutes) while depth of 1 takes constant time of O(~5 seconds). Bug: 468033850 Change-Id: I4b8ed62a8a636babcc5226552badb69600d0c353 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/535481 Tested-by: Mike Frysinger Commit-Queue: Mike Frysinger Reviewed-by: Gavin Mak --- man/repo-init.1 | 4 ++-- repo | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/man/repo-init.1 b/man/repo-init.1 index 374117527..55b885c4c 100644 --- a/man/repo-init.1 +++ b/man/repo-init.1 @@ -1,5 +1,5 @@ .\" DO NOT MODIFY THIS FILE! It was generated by help2man. -.TH REPO "1" "September 2024" "repo init" "Repo Manual" +.TH REPO "1" "December 2025" "repo init" "Repo Manual" .SH NAME repo \- repo init - manual page for repo init .SH SYNOPSIS @@ -53,7 +53,7 @@ create a git checkout of the manifest repo .TP \fB\-\-manifest\-depth\fR=\fI\,DEPTH\/\fR create a shallow clone of the manifest repo with given -depth (0 for full clone); see git clone (default: 0) +depth (0 for full clone); see git clone (default: 1) .SS Manifest (only) checkout options: .TP \fB\-c\fR, \fB\-\-current\-branch\fR diff --git a/repo b/repo index ee3a5b79b..43d30cc2e 100755 --- a/repo +++ b/repo @@ -129,7 +129,7 @@ if not REPO_REV: BUG_URL = "https://issues.gerritcodereview.com/issues/new?component=1370071" # increment this whenever we make important changes to this script -VERSION = (2, 54) +VERSION = (2, 61) # increment this if the MAINTAINER_KEYS block is modified KEYRING_VERSION = (2, 3) @@ -325,7 +325,7 @@ def InitParser(parser): group.add_option( "--manifest-depth", type="int", - default=0, + default=1, metavar="DEPTH", help="create a shallow clone of the manifest repo with " "given depth (0 for full clone); see git clone "