Bug 241760

Summary: prepare-commit-msg includes unstaged changes
Product: WebKit Reporter: Matt Woodrow <mattwoodrow>
Component: Tools / TestsAssignee: Matt Woodrow <mattwoodrow>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, graouts, jbedard, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 239082    

Description Matt Woodrow 2022-06-19 13:37:19 PDT
Creating a commit with some changes unstaged still results in those changes being included in the generated commit message.

I think we need to pass `--git-index` to `prepare-ChangeLog` in order to only create a commit message template from the staged files.
Comment 1 Radar WebKit Bug Importer 2022-06-26 13:38:12 PDT
<rdar://problem/95940276>
Comment 2 Matt Woodrow 2022-06-27 18:17:41 PDT
Somewhat relatedly, when using `git commit --amend` to edit a commit, the provided list of changed files (as # lines) only contains the newly modified files.

For my usage, it'd probably be easier if it just gave the full set of changes, so that I can replace the set in the existing commit message as a whole, rather than merging in line-by-line. I guess providing both would be the best of both worlds?
Comment 3 Matt Woodrow 2022-07-26 18:00:42 PDT
Pull request: https://github.com/WebKit/WebKit/pull/2764
Comment 4 EWS 2022-09-07 20:37:26 PDT
Committed 254260@main (b4f3e7d2afaf): <https://commits.webkit.org/254260@main>

Reviewed commits have been landed. Closing PR #2764 and removing active labels.