mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Revert "Avoid silently overwriting diff.ignoreSubmodules config."
This reverts commit acd68a9a5d.
Reason for revert: Doesn't get values for non scoped config.
Original change's description:
> Avoid silently overwriting diff.ignoreSubmodules config.
>
> Setting this to `dirty` is generally desirable. If the user has
> explicitly set it to something else on their chromium checkout,
> warn rather than silently overwriting.
>
> Bug: 362787698
> Change-Id: I56587d501aafc5de78c82bc46e29f926519d25fa
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5832742
> Reviewed-by: Josip Sokcevic <sokcevic@chromium.org>
> Commit-Queue: Helmut Januschka <helmut@januschka.com>
Bug: 362787698
Change-Id: I3e5d1e44e3707dda53dc398f83c43259868d343b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/5842067
Bot-Commit: Rubber Stamper <rubber-stamper@appspot.gserviceaccount.com>
Reviewed-by: Joey Scarr <jsca@google.com>
Owners-Override: Joey Scarr <jsca@google.com>
Commit-Queue: Dan Le Febvre <dlf@google.com>
This commit is contained in:
@@ -677,27 +677,9 @@ class GitWrapper(SCMWrapper):
|
||||
config_updates.append(
|
||||
('blame.ignoreRevsFile', '.git-blame-ignore-revs'))
|
||||
|
||||
ignore_submodules = scm.GIT.GetConfig(args[0].checkout_path,
|
||||
'diff.ignoresubmodules',
|
||||
None, 'local')
|
||||
|
||||
if not ignore_submodules:
|
||||
if scm.GIT.GetConfig(args[0].checkout_path,
|
||||
'diff.ignoresubmodules') != 'dirty':
|
||||
config_updates.append(('diff.ignoreSubmodules', 'dirty'))
|
||||
elif ignore_submodules != 'dirty':
|
||||
warning_message = (
|
||||
"diff.ignoreSubmodules is not set to 'dirty' "
|
||||
"for this repository.\n"
|
||||
"This may cause unexpected behavior with submodules; "
|
||||
"see //docs/git_submodules.md\n"
|
||||
"Consider setting the config:\n"
|
||||
"\tgit config diff.ignoreSubmodule dirty\n"
|
||||
"or disable this warning by setting the "
|
||||
"GCLIENT_SUPPRESS_SUBMODULE_WARNING environment "
|
||||
"variable to 1.")
|
||||
if os.environ.get(
|
||||
'GCLIENT_SUPPRESS_SUBMODULE_WARNING') != '1':
|
||||
gclient_utils.AddWarning(warning_message)
|
||||
|
||||
|
||||
if scm.GIT.GetConfig(args[0].checkout_path,
|
||||
'fetch.recursesubmodules') != 'off':
|
||||
|
||||
Reference in New Issue
Block a user