From d7ebdf56be6095338ea37bd4b52533c5bd7774e7 Mon Sep 17 00:00:00 2001 From: Kaushik Lingarkar Date: Thu, 5 Sep 2024 15:34:48 -0700 Subject: init: add --manifest-upstream-branch When a sha1 is provided to '--manifest-branch', the ref which is expected to contain that sha1 can be provided using the new '--manifest-upstream-branch' option. This is useful with '--current-branch' to avoid having to sync all heads and tags, or with a commit that comes from a non-head/tag ref (like a Gerrit change ref). Change-Id: I46a3e255ca69ed9e809039e58b0c163e02af94ef Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/436717 Reviewed-by: Josip Sokcevic Commit-Queue: Kaushik Lingarkar Tested-by: Kaushik Lingarkar --- repo | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'repo') diff --git a/repo b/repo index b2114e56..9cedcbf9 100755 --- a/repo +++ b/repo @@ -124,7 +124,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, 45) +VERSION = (2, 48) # increment this if the MAINTAINER_KEYS block is modified KEYRING_VERSION = (2, 3) @@ -282,6 +282,12 @@ def InitParser(parser): metavar="REVISION", help="manifest branch or revision (use HEAD for default)", ) + group.add_option( + "--manifest-upstream-branch", + help="when a commit is provided to --manifest-branch, this " + "is the name of the git ref in which the commit can be found", + metavar="BRANCH", + ) group.add_option( "-m", "--manifest-name", -- cgit v1.2.3-54-g00ecf