mirror of
https://gerrit.googlesource.com/git-repo
synced 2025-06-26 20:17:52 +00:00
Add envar to replace shallow clones with partial
An investigation go/git-repo-shallow shows a number of problems when doing a shallow git fetch/clone. This change introduces an environment variable REPO_ALLOW_SHALLOW. When this environment variable is set to 1 during a repo init or repo sync all shallow git fetch commands are replaced with partial fetch commands. Any shallow repository needing update is unshallowed. This behavior continues until a subsequent repo sync command is run with REPO_ALLOW_SHALLOW set to 1. Bug: b/274340522 Change-Id: I1c3188270629359e52449788897d9d4988ebf280 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/374754 Reviewed-by: Josip Sokcevic <sokcevic@google.com> Tested-by: Jason Chang <jasonnc@google.com>
This commit is contained in:
@ -981,6 +981,12 @@ https://gerrit.googlesource.com/git-repo/+/HEAD/docs/manifest-format.md
|
||||
return self.manifestProject.clone_filter
|
||||
return None
|
||||
|
||||
@property
|
||||
def CloneFilterForDepth(self):
|
||||
if self.manifestProject.clone_filter_for_depth:
|
||||
return self.manifestProject.clone_filter_for_depth
|
||||
return None
|
||||
|
||||
@property
|
||||
def PartialCloneExclude(self):
|
||||
exclude = self.manifest.manifestProject.partial_clone_exclude or ""
|
||||
|
Reference in New Issue
Block a user