prepare-commit-msg hook doesn't generate a changed file list with Windows Git 1. python Tools\Scripts\git-webkit setup 2. Stage any changes. git reset --soft @^ 3. git commit prepare-ChangeLog reproted "Can't locate VCSUtils.pm in @INC". PS C:\home\webkit\bt> git commit Can't locate VCSUtils.pm in @INC (you may need to install the VCSUtils module) (@INC contains: /c/home/webkit /usr/lib/perl5/site_perl /usr/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl) at C:/home/webkit/bt\Tools\Scripts\prepare-ChangeLog line 65. BEGIN failed--compilation aborted at C:/home/webkit/bt\Tools\Scripts\prepare-ChangeLog line 65.
This error message is reported by msys perl which is included in Windows Git. If I manually modify 'perl' in '.git/hooks/prepare-commit-msg' to 'C:\\xampp\\perl\\bin\\perl', it works as expected.
In prepare-ChangeLog, $FindBin::Bin has a wrong path. That's the reason VCSUtils.pm can't be located.
Another workaround is modifying the following line in '.git/hooks/prepare-commit-msg' > command = ['perl', os.path.join(SCRIPTS, 'prepare-ChangeLog'), '--no-write', '--only-files', '--delimiters', '--git-index'] with > command = ['perl', '-I' + SCRIPTS, os.path.join(SCRIPTS, 'prepare-ChangeLog'), '--no-write', '--only-files', '--delimiters', '--git-index']
Pull request: https://github.com/WebKit/WebKit/pull/17400
Committed 267649@main (662e3790e0b6): <https://commits.webkit.org/267649@main> Reviewed commits have been landed. Closing PR #17400 and removing active labels.
<rdar://problem/115007659>