The git style hook currently includes a few lines of diff context when
determining changed regions. This is undesirable as this triggers
false positives when modifying existing files with a lot of style
violations. This change sets the amount of context to 0, which is the
default value when requesting staged regions from the git helper.
Change-Id: Ibe03123e329ea0241281e104183a68d6c495b190
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-by: Nathanael Premillieu <nathanael.premillieu@arm.com>
opts = {}
repo_base = git.repo_base()
-context = 8
ui = StdioUI()
os.chdir(repo_base)
if args.verbose:
print "Checking %s..." % fname
if status == "M":
- regions = git.staged_regions(fname, context=context)
+ regions = git.staged_regions(fname)
else:
regions = all_regions