<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>261097</bug_id>
          
          <creation_ts>2023-09-03 22:25:47 -0700</creation_ts>
          <short_desc>prepare-commit-msg hook doesn&apos;t generate a changed file list with Windows Git</short_desc>
          <delta_ts>2023-09-05 13:39:15 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Fujii Hironori">fujii</reporter>
          <assigned_to name="Fujii Hironori">fujii</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1975311</commentid>
    <comment_count>0</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-09-03 22:25:47 -0700</bug_when>
    <thetext>prepare-commit-msg hook doesn&apos;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 &quot;Can&apos;t locate VCSUtils.pm in @INC&quot;.

PS C:\home\webkit\bt&gt; git commit
Can&apos;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.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1975312</commentid>
    <comment_count>1</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-09-03 22:28:32 -0700</bug_when>
    <thetext>This error message is reported by msys perl which is included in Windows Git.

If I manually modify &apos;perl&apos; in &apos;.git/hooks/prepare-commit-msg&apos; to &apos;C:\\xampp\\perl\\bin\\perl&apos;, it works as expected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1975313</commentid>
    <comment_count>2</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-09-03 22:30:08 -0700</bug_when>
    <thetext>In prepare-ChangeLog, $FindBin::Bin has a wrong path.
That&apos;s the reason VCSUtils.pm can&apos;t be located.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1975314</commentid>
    <comment_count>3</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-09-03 22:32:35 -0700</bug_when>
    <thetext>Another workaround is modifying the following line in &apos;.git/hooks/prepare-commit-msg&apos;

&gt;    command = [&apos;perl&apos;, os.path.join(SCRIPTS, &apos;prepare-ChangeLog&apos;), &apos;--no-write&apos;, &apos;--only-files&apos;, &apos;--delimiters&apos;, &apos;--git-index&apos;]

with

&gt;    command = [&apos;perl&apos;, &apos;-I&apos; + SCRIPTS, os.path.join(SCRIPTS, &apos;prepare-ChangeLog&apos;), &apos;--no-write&apos;, &apos;--only-files&apos;, &apos;--delimiters&apos;, &apos;--git-index&apos;]</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1975324</commentid>
    <comment_count>4</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2023-09-03 23:07:23 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/17400</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1975652</commentid>
    <comment_count>5</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2023-09-05 13:38:39 -0700</bug_when>
    <thetext>Committed 267649@main (662e3790e0b6): &lt;https://commits.webkit.org/267649@main&gt;

Reviewed commits have been landed. Closing PR #17400 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1975653</commentid>
    <comment_count>6</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2023-09-05 13:39:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/115007659&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>