RESOLVED FIXED 261097
prepare-commit-msg hook doesn't generate a changed file list with Windows Git
https://bugs.webkit.org/show_bug.cgi?id=261097
Summary prepare-commit-msg hook doesn't generate a changed file list with Windows Git
Fujii Hironori
Reported 2023-09-03 22:25:47 PDT
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.
Attachments
Fujii Hironori
Comment 1 2023-09-03 22:28:32 PDT
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.
Fujii Hironori
Comment 2 2023-09-03 22:30:08 PDT
In prepare-ChangeLog, $FindBin::Bin has a wrong path. That's the reason VCSUtils.pm can't be located.
Fujii Hironori
Comment 3 2023-09-03 22:32:35 PDT
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']
Fujii Hironori
Comment 4 2023-09-03 23:07:23 PDT
EWS
Comment 5 2023-09-05 13:38:39 PDT
Committed 267649@main (662e3790e0b6): <https://commits.webkit.org/267649@main> Reviewed commits have been landed. Closing PR #17400 and removing active labels.
Radar WebKit Bug Importer
Comment 6 2023-09-05 13:39:15 PDT
Note You need to log in before you can comment on or make changes to this bug.