<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 - webkit-patch should try harder to upload to the right bug when -b is not passed"
   href="https://bugs.webkit.org/show_bug.cgi?id=143965">143965</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>webkit-patch should try harder to upload to the right bug when -b is not passed
          </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>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </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>mcatanzaro&#64;igalia.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I used the following command to upload a patch to Bugzilla for the commit prior to my HEAD (&#64;):

webkit-patch upload -g &#64;^

The patch was uploaded to the wrong bug. It went to the bug specified in &#64; instead, even though that bug was not mentioned anywhere in the commit message or diff of &#64;^. There was exactly one bug present in the commit diff (in a ChangeLog file); I would have expected the patch to be uploaded to that bug.

The problem might be that Git.changed_files() in git.py seems to return the set of files changed SINCE the specified commit, rather than the set of files changed BY that commit (so none of the files changed in the commit are included). That seems confusing. AbstractPatchUploadingCommand._bug_id() in upload.py reasonably assumes it returns the files changed in that commit, which means -g will never pick the right bug except when using -g &#64;.

I've also noticed that webkit-patch post-commits is prone to choose wrong bugs, but that might be a separate issue.</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>