mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
[win-bootstrap] Use git config commands supported by older versions
In git 2.41, both `list` and `unset` are only options, `--list` and `--unset` respectively. See https://git-scm.com/docs/git-config/2.41.0 These modes are deprecated in later versions; it is recommended to migrate to the newer syntax, but the old syntax is still supported. Bug: b/382395049 Change-Id: I9150983084b91279e4f4587a80737e6813937cd6 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6083215 Commit-Queue: Anne Redulla <aredulla@google.com> Reviewed-by: Peter Boström <pbos@chromium.org> Owners-Override: Anne Redulla <aredulla@google.com>
This commit is contained in:
@@ -361,7 +361,8 @@ def get_git_global_config(git_path):
|
||||
# us to securely parse the output even if a value contains line breaks.
|
||||
# See docs at:
|
||||
# https://git-scm.com/docs/git-config#Documentation/git-config.txt--z
|
||||
stdout, _ = _check_call([git_path, 'config', 'list', '--global', '-z'],
|
||||
stdout, _ = _check_call(
|
||||
[git_path, 'config', '--list', '--global', '-z'],
|
||||
stdout=subprocess.PIPE,
|
||||
encoding='utf-8')
|
||||
except subprocess.CalledProcessError as e:
|
||||
@@ -445,7 +446,7 @@ def _win_git_bootstrap_config():
|
||||
postprocess_key = 'depot-tools.gitPostprocessVersion'
|
||||
if current_config.get(postprocess_key) != None:
|
||||
_check_call(
|
||||
[git_bat_path, 'config', 'unset', '--global', postprocess_key])
|
||||
[git_bat_path, 'config', '--unset', '--global', postprocess_key])
|
||||
|
||||
|
||||
def git_postprocess(template, add_docs):
|
||||
|
||||
Reference in New Issue
Block a user