Lines Matching full:commit
107 """The git commit message."""
112 """The git commit sha1."""
117 """List of files modified in this git commit."""
157 diff: The list of files that changed in the current commit.
269 def _check_cmd(hook_name, project, commit, cmd, fixup_func=None, **kwargs):
271 return [rh.results.HookCommandResult(hook_name, project, commit,
284 def check_custom(project, commit, _desc, diff, options=None, **kwargs):
286 return _check_cmd(options.name, project, commit, options.args((), diff),
290 def check_checkpatch(project, commit, _desc, diff, options=None):
295 return _check_cmd('checkpatch.pl', project, commit, cmd,
296 input=rh.git.get_patch(commit))
299 def check_clang_format(project, commit, _desc, diff, options=None):
300 """Run git clang-format on the commit."""
306 options.args(('--style', 'file', '--commit', commit), diff))
309 return _check_cmd('clang-format', project, commit, cmd,
313 def check_google_java_format(project, commit, _desc, _diff, options=None):
314 """Run google-java-format on the commit."""
321 '--commit', commit] + options.args()
324 return _check_cmd('google-java-format', project, commit, cmd,
328 def check_commit_msg_bug_field(project, commit, desc, _diff, options=None):
329 """Check the commit message for a 'Bug:' line."""
335 raise ValueError('commit msg %s check takes no options' % (field,))
343 error = ('Commit message is missing a "%s:" line. It must match:\n'
348 return [rh.results.HookResult('commit msg: "%s:" check' % (field,),
349 project, commit, error=error)]
352 def check_commit_msg_changeid_field(project, commit, desc, _diff, options=None):
353 """Check the commit message for a 'Change-Id:' line."""
359 raise ValueError('commit msg %s check takes no options' % (field,))
367 error = ('Commit message is missing a "%s:" line. It must match:\n'
370 error = ('Commit message has too many "%s:" lines. There can be only '
375 return [rh.results.HookResult('commit msg: "%s:" check' % (field,),
376 project, commit, error=error)]
379 TEST_MSG = """Commit message is missing a "Test:" line. It must match:
406 def check_commit_msg_test_field(project, commit, desc, _diff, options=None):
407 """Check the commit message for a 'Test:' line."""
413 raise ValueError('commit msg %s check takes no options' % (field,))
425 return [rh.results.HookResult('commit msg: "%s:" check' % (field,),
426 project, commit, error=error)]
429 def check_cpplint(project, commit, _desc, diff, options=None):
439 return _check_cmd('cpplint', project, commit, cmd)
442 def check_gofmt(project, commit, _desc, diff, options=None):
452 data = rh.git.get_file_content(commit, d.file)
456 'gofmt', project, commit, error=result.output,
461 def check_json(project, commit, _desc, diff, options=None):
472 data = rh.git.get_file_content(commit, d.file)
477 'json', project, commit, error=str(e),
482 def check_pylint(project, commit, _desc, diff, options=None):
493 return _check_cmd('pylint', project, commit, cmd)
496 def check_xmllint(project, commit, _desc, diff, options=None):
537 return _check_cmd('xmllint', project, commit, cmd)