mirror of
https://gerrit.googlesource.com/git-repo
synced 2024-12-21 07:16:21 +00:00
Do not try to fetch default revision for mirrors always
* Mirrors may contain multiple projects, some of which may not
always contain the default revision.
* Only fetch the default revision explicitly if
'--current-branch' is set.
* Fixes breakage casued by
commit 6856f98467
"Fix repo mirror with --current-branch"
Bug: https://crbug.com/gerrit/12274
Change-Id: Iaafabe2992f76f3644b841f24245d3e19c9515a9
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/253093
Reviewed-by: Kuang-che Wu <kcwu@chromium.org>
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Chirayu Desai <chirayudesai1@gmail.com>
This commit is contained in:
parent
bd0aae95f5
commit
f7b64e3350
@ -2322,6 +2322,9 @@ class Project(object):
|
|||||||
spec.append('tag')
|
spec.append('tag')
|
||||||
spec.append(tag_name)
|
spec.append(tag_name)
|
||||||
|
|
||||||
|
if self.manifest.IsMirror and not current_branch_only:
|
||||||
|
branch = None
|
||||||
|
else:
|
||||||
branch = self.revisionExpr
|
branch = self.revisionExpr
|
||||||
if (not self.manifest.IsMirror and is_sha1 and depth
|
if (not self.manifest.IsMirror and is_sha1 and depth
|
||||||
and git_require((1, 8, 3))):
|
and git_require((1, 8, 3))):
|
||||||
|
Loading…
Reference in New Issue
Block a user