Bug 27908 - check-webkit-style --git-commit has bugs if you select a commit in the past
Summary: check-webkit-style --git-commit has bugs if you select a commit in the past
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: David Levin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-31 18:44 PDT by David Levin
Modified: 2009-07-31 19:36 PDT (History)
3 users (show)

See Also:


Attachments
Proposed fix. (4.33 KB, patch)
2009-07-31 18:56 PDT, David Levin
no flags Details | Formatted Diff | Diff
Proposed fix. (4.34 KB, patch)
2009-07-31 19:22 PDT, David Levin
manyoso: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Levin 2009-07-31 18:44:39 PDT
check-wekbit-style uses the diff on the single commit to get the lines changes so it can filter error messages.

The problem is that the lines changed in the commit may have moved since the commit was done, so the filtering is incorrect. 

This fix is uses the commit given as the starting point and the current directory state as the ending point.
Comment 1 David Levin 2009-07-31 18:56:56 PDT
Created attachment 33919 [details]
Proposed fix.
Comment 2 Adam Treat 2009-07-31 19:07:13 PDT
Comment on attachment 33919 [details]
Proposed fix.

> +            commitish = flags["--git-commit"]
> +            if commitish.find('..'):
> +                # FIXME: If the range is a "...", the code should find the common ancesto,
> +                # do the diff from there.

Not sure I understand this FIXME.  And you mean 'ancestoR', right?
Comment 3 David Levin 2009-07-31 19:22:28 PDT
Created attachment 33921 [details]
Proposed fix.

Addressed some coding issues mention by Eric.
Fixed the spelling issue and tried to clarify the issue mentioned by Adam.
Comment 4 David Levin 2009-07-31 19:36:56 PDT
http://trac.webkit.org/changeset/46652