Clarify that gclient gitmodules' changes need to be committed.

Bug: 1483198
Change-Id: I1dfae06bfc273b01d168b507861984327ad0d629
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4892468
Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
Commit-Queue: Joanna Wang <jojwang@chromium.org>
changes/68/4892468/13
Joanna Wang 2 years ago committed by LUCI CQ
parent 0471c76c58
commit 6aed4f5a0c

@ -2901,8 +2901,8 @@ def CMDgitmodules(parser, args):
if cache_info: if cache_info:
subprocess2.call(['git', 'update-index', '--add'] + cache_info) subprocess2.call(['git', 'update-index', '--add'] + cache_info)
subprocess2.call(['git', 'add', '.gitmodules']) subprocess2.call(['git', 'add', '.gitmodules'])
print('.gitmodules and gitlinks updated. Please check git diff and ' print('.gitmodules and gitlinks updated. Please check `git diff --staged`'
'commit changes.') 'and commit those staged changes (`git commit` without -a)')
@metrics.collector.collect_metrics('gclient flatten') @metrics.collector.collect_metrics('gclient flatten')

@ -1963,6 +1963,8 @@ def CheckForCommitObjects(input_api, output_api):
'To reset all git submodule git entries to match DEPS, run\n' 'To reset all git submodule git entries to match DEPS, run\n'
'the following command in the root of this repository:\n' 'the following command in the root of this repository:\n'
' gclient gitmodules' ' gclient gitmodules'
'This will update AND stage the entries to the correct revisions.\n'
'Then commit these staged changes only (`git commit` without -a).\n'
'\n\n' '\n\n'
'The following entries diverged: ' + deps_msg) 'The following entries diverged: ' + deps_msg)
] ]

Loading…
Cancel
Save