From d73a92619e15732d55ae08cfc657d4726f859b22 Mon Sep 17 00:00:00 2001 From: Josip Sokcevic Date: Wed, 1 May 2024 22:07:16 +0000 Subject: [PATCH] [gclient] Don't inherit git_dependency from parent If a child repository is not cloned, gclient will assume git_dependency to match parent, which can be incorrect. R=gavinmak Change-Id: Icb464524f5dcf2e18ccae1db00c69963ffd9ef02 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5506655 Auto-Submit: Josip Sokcevic Reviewed-by: Gavin Mak Commit-Queue: Gavin Mak --- gclient.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gclient.py b/gclient.py index 20ef28fa7..fcce74596 100755 --- a/gclient.py +++ b/gclient.py @@ -797,8 +797,7 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): should_recurse=name in self.recursedeps, relative=use_relative_paths, condition=condition, - protocol=self.protocol, - git_dependencies_state=self.git_dependencies_state)) + protocol=self.protocol)) # TODO(crbug.com/1341285): Understand why we need this and remove # it if we don't. @@ -2243,8 +2242,7 @@ it or fix the checkout. should_recurse=False, relative=None, condition=None, - protocol=self.protocol, - git_dependencies_state=self.git_dependencies_state)) + protocol=self.protocol)) if modified_files and self._options.delete_unversioned_trees: print( '\nWARNING: \'%s\' is no longer part of this client.\n'