Commit d3b2548e authored by Andrew Grieve's avatar Andrew Grieve Committed by Commit Bot

Fix CheckPatchFormatted() error message when using inherit-review-settings-ok

Follow-up to d86c8037. The error message
was still saying "src" rather than the repository root.

Bug: 768962
Change-Id: I781191e561db889a28acf51ee49a20d6d352b489
Reviewed-on: https://chromium-review.googlesource.com/719718Reviewed-by: 's avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: agrieve <agrieve@chromium.org>
parent a727b911
......@@ -1103,7 +1103,10 @@ def CheckPatchFormatted(input_api, output_api, check_js=False):
cmd.append(input_api.PresubmitLocalPath())
code, _ = git_cl.RunGitWithCode(cmd, suppress_stderr=True)
if code == 2:
short_path = input_api.basename(input_api.PresubmitLocalPath())
if presubmit_subdir:
short_path = presubmit_subdir
else:
short_path = input_api.basename(input_api.change.RepositoryRoot())
return [output_api.PresubmitPromptWarning(
'The %s directory requires source formatting. '
'Please run: git cl format %s%s' %
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment