mirror of
https://chromium.googlesource.com/chromium/tools/depot_tools.git
synced 2026-01-11 18:51:29 +00:00
Remove unnecessary RunHook call for squash mode.
RunHook being called at the beginning of the git cl upload command, is necessary for non-squash mode, but is an extra and unnecessary call for squash mode. This Runhook call can be moved later down the call stack as well, but would require a lot more changes to tests (in what needs to be mocked) Change-Id: I0373c5de84d98c4e8c39dece95a247227562ab82 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/6181588 Reviewed-by: Josip Sokcevic <sokcevic@chromium.org> Commit-Queue: Joanna Wang <jojwang@chromium.org>
This commit is contained in:
@@ -2187,7 +2187,10 @@ class Changelist(object):
|
||||
|
||||
change_desc = self._GetDescriptionForUpload(options, git_diff_args,
|
||||
files)
|
||||
if not options.bypass_hooks:
|
||||
|
||||
# For options.squash, RunHook is called once for each branch in
|
||||
# PrepareChange().
|
||||
if not options.bypass_hooks and not options.squash:
|
||||
hook_results = self.RunHook(committing=False,
|
||||
may_prompt=not options.force,
|
||||
verbose=options.verbose,
|
||||
|
||||
Reference in New Issue
Block a user