summaryrefslogtreecommitdiffstats
path: root/repo
diff options
context:
space:
mode:
authorKaushik Lingarkar <kaushik.lingarkar@linaro.org>2024-09-05 15:34:48 -0700
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2024-09-26 00:52:28 +0000
commitd7ebdf56be6095338ea37bd4b52533c5bd7774e7 (patch)
treee6db62fd873e70bb0453791a69f8772f9d567a0c /repo
parentfabab4e24527fca9b6b4a0c64607524b1890c609 (diff)
downloadgit-repo-d7ebdf56be6095338ea37bd4b52533c5bd7774e7.tar.gz
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 <sokcevic@google.com> Commit-Queue: Kaushik Lingarkar <kaushik.lingarkar@linaro.org> Tested-by: Kaushik Lingarkar <kaushik.lingarkar@linaro.org>
Diffstat (limited to 'repo')
-rwxr-xr-xrepo8
1 files changed, 7 insertions, 1 deletions
diff --git a/repo b/repo
index b2114e56..9cedcbf9 100755
--- a/repo
+++ b/repo
@@ -124,7 +124,7 @@ if not REPO_REV:
124BUG_URL = "https://issues.gerritcodereview.com/issues/new?component=1370071" 124BUG_URL = "https://issues.gerritcodereview.com/issues/new?component=1370071"
125 125
126# increment this whenever we make important changes to this script 126# increment this whenever we make important changes to this script
127VERSION = (2, 45) 127VERSION = (2, 48)
128 128
129# increment this if the MAINTAINER_KEYS block is modified 129# increment this if the MAINTAINER_KEYS block is modified
130KEYRING_VERSION = (2, 3) 130KEYRING_VERSION = (2, 3)
@@ -283,6 +283,12 @@ def InitParser(parser):
283 help="manifest branch or revision (use HEAD for default)", 283 help="manifest branch or revision (use HEAD for default)",
284 ) 284 )
285 group.add_option( 285 group.add_option(
286 "--manifest-upstream-branch",
287 help="when a commit is provided to --manifest-branch, this "
288 "is the name of the git ref in which the commit can be found",
289 metavar="BRANCH",
290 )
291 group.add_option(
286 "-m", 292 "-m",
287 "--manifest-name", 293 "--manifest-name",
288 default="default.xml", 294 default="default.xml",