Bug 26664

Summary: Add a flag to prepare-ChangeLog to only check the git index
Product: WebKit Reporter: Joe Mason <joenotcharles>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Severity: Enhancement CC: aroben, manyoso
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Description Flags
implement this flag
same patch with updated copyright info manyoso: review+

Description Joe Mason 2009-06-23 15:35:30 PDT
By default, prepare-ChangeLog has two modes when used with git: by default it looks at all changes in both the index and the working tree, and with the --git-commit switch it looks at all changes in a specific commit.

When preparing a new commit, the most useful thing to do is to look only at the changes in the index so that the ChangeLog entry exactly matches what's about to be checked in.  Changes that are in the working tree but not the index aren't part of this commit so they shouldn't usually go in the ChangeLog.

Workflow with this switch would be:

    Make code changes
    git add (list of affected files)
    prepare-ChangeLog --git-index
    edit ChangeLog entries
    git add (ChangeLog file)
    git commit -t /path/to/ChangeLog (and remove all entries but the first from the commit message)

(This should be added as a flag to avoid confusing people who are already used to the old behaviour.)
Comment 1 Joe Mason 2009-06-23 15:37:05 PDT
Created attachment 31747 [details]
implement this flag

This patch was created with this very process!
Comment 2 Joe Mason 2009-06-23 15:44:59 PDT
Created attachment 31748 [details]
same patch with updated copyright info
Comment 3 Adam Treat 2009-06-23 16:01:39 PDT
Comment on attachment 31748 [details]
same patch with updated copyright info

I'd also be open to '--git-cached' or '--git-staged' for the flag name.  But the first thing said under the documentation for 'git add' is, "git-add - Add file contents to the index."  Also, the main tutorial is full of references to the "index".  So I guess we'll go with that.
Comment 4 Adam Treat 2009-06-23 16:11:26 PDT
Landed with r45012.