<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - prepare-ChangeLog reports function above deleted function as deleted; uninitialized value warning when staged non-empty file for commit"
   href="https://bugs.webkit.org/show_bug.cgi?id=145082">145082</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>prepare-ChangeLog reports function above deleted function as deleted; uninitialized value warning when staged non-empty file for commit
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>WebKit
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>528+ (Nightly build)
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>Normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P2
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Tools / Tests
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>webkit-unassigned&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>dbates&#64;webkit.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Perl warns of the use of an uninitialized variable in prepare-ChangeLog when the working copy has a non-empty new file staged for commit:

Use of uninitialized value $first_line in pattern match (m//) at Tools/Scripts/prepare-ChangeLog line 644.

Without loss of generality, you can reproduce this issue by running the following terminal commands inside the top-level directory of a Git checkout of the WebKit repository:

$ echo 'A' &gt; A.txt
$ git add A.txt 
$ Tools/Scripts/prepare-ChangeLog

Then you will see output of the form:

  Running status to find changed, added, or removed files.
  Reviewing diff to determine which lines changed.
  Extracting affected function names from source files.
fatal: Path 'A.txt' exists on disk, but not in 'HEAD'.
Use of uninitialized value $first_line in pattern match (m//) at Tools/Scripts/prepare-ChangeLog line 644.
  Change author: Daniel Bates &lt;<a href="mailto:dabates&#64;apple.com">dabates&#64;apple.com</a>&gt;.
  Editing the ./ChangeLog file.
-- Please remember to include a detailed description in your ChangeLog entry. --
-- See &lt;<a href="http://webkit.org/coding/contributing.html">http://webkit.org/coding/contributing.html</a>&gt; for more info --</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>