From a90906c74d9da1ed0d55b0452c3e00c35fc82c1f Mon Sep 17 00:00:00 2001 From: Anne Redulla Date: Tue, 14 Jan 2025 15:46:23 -0800 Subject: [PATCH] [win-bootstrap] Never add docs to Git Bug: b/360206460 Change-Id: Ic285b8e3dc38524a184c0e01dbfdaf9b403ce19a Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6171043 Reviewed-by: Josip Sokcevic Reviewed-by: Allen Li Commit-Queue: Anne Redulla --- bootstrap/bootstrap.py | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/bootstrap/bootstrap.py b/bootstrap/bootstrap.py index 3889d82a8..176e6b7bc 100644 --- a/bootstrap/bootstrap.py +++ b/bootstrap/bootstrap.py @@ -453,20 +453,7 @@ def _win_git_bootstrap_config(): [git_bat_path, 'config', '--unset', '--global', postprocess_key]) -def git_postprocess(template, add_docs): - if add_docs: - # Update depot_tools files for "git help ". - mingw_dir = git_get_mingw_dir(template.GIT_BIN_ABSDIR) - if mingw_dir: - docsrc = os.path.join(ROOT_DIR, 'man', 'html') - git_docs_dir = os.path.join(mingw_dir, 'share', 'doc', 'git-doc') - for name in os.listdir(docsrc): - maybe_copy(os.path.join(docsrc, name), - os.path.join(git_docs_dir, name)) - else: - logging.info('Could not find mingw directory for %r.', - template.GIT_BIN_ABSDIR) - +def git_postprocess(template): # Create Git templates and configure its base layout. for stub_name, relpath in WIN_GIT_STUBS.items(): stub_template = template._replace(GIT_PROGRAM=relpath) @@ -498,17 +485,14 @@ def main(argv): clean_up_old_installations(bootstrap_dir) if IS_WIN: - # Avoid messing with system git docs. - add_docs = False git_dir = search_win_git_directory() if not git_dir: # Either using system git was not enabled # or git was not found in PATH. # Fall back to depot_tools bundled git. git_dir = os.path.join(bootstrap_dir, 'git') - add_docs = True template = template._replace(GIT_BIN_ABSDIR=git_dir) - git_postprocess(template, add_docs) + git_postprocess(template) templates = [ ('git-bash.template.sh', 'git-bash', ROOT_DIR), ('python3.bat', 'python3.bat', ROOT_DIR),