From cb0a55b733225af4706c51686c339ce9d93c9bbf Mon Sep 17 00:00:00 2001 From: Joanna Wang Date: Tue, 30 May 2023 17:26:25 +0000 Subject: [PATCH] Add exact git update-index command in presubmit mismatch message. Bug:1417051 Change-Id: Iaadced083d49de2e76c04649ab71a4b0534c0706 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4574568 Reviewed-by: Josip Sokcevic Auto-Submit: Joanna Wang Commit-Queue: Joanna Wang --- presubmit_canned_checks.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/presubmit_canned_checks.py b/presubmit_canned_checks.py index 045f71475..6a132f77d 100644 --- a/presubmit_canned_checks.py +++ b/presubmit_canned_checks.py @@ -1774,8 +1774,10 @@ def CheckForCommitObjects(input_api, output_api): output_api.PresubmitError( 'DEPS file indicates git submodule migration is in progress,\n' 'but the commit objects do not match DEPS entries.\n' - 'Update the following commit objects or DEPS entries:\n', - mismatch_entries) + 'Update the following commit objects with:\n' + '`git update-index --add --cacheinfo 160000,,`' + '\n' + 'or DEPS entries:\n', mismatch_entries) ] return []