Bug 125364 - check-webkit-style should understand --git-index
Summary: check-webkit-style should understand --git-index
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-12-06 13:40 PST by Brian Burg
Modified: 2014-04-29 14:58 PDT (History)
5 users (show)

See Also:


Attachments
Adding --git-index option (8.08 KB, patch)
2014-04-23 04:11 PDT, Berta József
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Burg 2013-12-06 13:40:41 PST
prepare-Changelog can figure out how to only consider things in the git index (i.e., git diff --cached). check-webkit-style should support this option as well. It is useful for splitting changes into smaller patches.

I think this was also suggested here, in the context of bigger changes: https://bugs.webkit.org/show_bug.cgi?id=35781
Comment 1 Berta József 2014-04-23 04:11:55 PDT
Created attachment 229974 [details]
Adding --git-index option
Comment 2 WebKit Commit Bot 2014-04-29 03:20:05 PDT
Comment on attachment 229974 [details]
Adding --git-index option

Clearing flags on attachment: 229974

Committed r167926: <http://trac.webkit.org/changeset/167926>
Comment 3 WebKit Commit Bot 2014-04-29 03:20:08 PDT
All reviewed patches have been landed.  Closing bug.
Comment 4 Mark Lam 2014-04-29 11:31:19 PDT
This patch broke the Tools/Scripts/check-webkit-style script when run on a svn checkout.  For example:

$ ./Tools/Scripts/check-webkit-style 
Traceback (most recent call last):
  File "./Tools/Scripts/check-webkit-style", line 48, in <module>
    sys.exit(CheckWebKitStyle().main())
  File "/OpenSource/Tools/Scripts/webkitpy/style/main.py", line 152, in main
    patch = host.scm().create_patch(options.git_commit, changed_files=changed_files, git_index=options.git_index)
TypeError: create_patch() got an unexpected keyword argument 'git_index'
Comment 5 Lucas Forschler 2014-04-29 14:47:38 PDT
I think this can be fixed by adding a simple git_index=None argument to the create_patch function in checkout/scm/svn.py
Comment 6 Lucas Forschler 2014-04-29 14:58:45 PDT
Follow-up in 167957.