<html>
    <head>
      <base href="https://bugs.llvm.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 - Unhandled Exception when uploading a git patch from Windows using web interface"
   href="https://bugs.llvm.org/show_bug.cgi?id=37834">37834</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Unhandled Exception when uploading a git patch from Windows using web interface
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>Phabricator
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>All Bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>greg.bedwell@sony.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=20441" name="attach_20441" title="example patch file">attachment 20441</a> <a href="attachment.cgi?id=20441&action=edit" title="example patch file">[details]</a></span>
example patch file

Steps to reproduce:

1) Create a patch file using git for Windows.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
e:\work\upstream-llvm\llvm>git --version
git version 2.14.1.windows.1

e:\work\upstream-llvm\llvm>git commit -m "some commit"
[master 663a6ca48a3] some commit
 1 file changed, 2 insertions(+)

e:\work\upstream-llvm\llvm>git format-patch -1
0001-some-commit.patch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2) Using a browser, navigate to
<a href="https://reviews.llvm.org/differential/diff/create/">https://reviews.llvm.org/differential/diff/create/</a> and by "Raw Diff From File"
select "Choose File" and select the patch file created in Step 1 (attached).

3) Click "Create Diff" and observe the following error message:

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Diff Parse Exception: Expected a hunk header, like 'Index: /path/to/file.ext'
(svn), 'Property changes on: /path/to/file.ext' (svn properties), 'commit
59bcc3ad6775562f845953cf01624225' (git show), 'diff --git' (git diff), '---
filename' (unified diff), or 'diff -r' (hg diff or patch).

            780      # The file should not end with two newlines. It creates
unnecessary churn.
            781      while len(output_lines) > 0 and output_lines[-1] == '':
            782        output_lines.pop()
            783    
            784      if input_lines == output_lines:
   >>>      785   -- 
            786   2.14.1.windows.1
            787   
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


The key appears to be the text "windows" in the version string.  If I remove
the version string entirely, or replace it with something like
"2.14.1.1234567.1" then the diff is created as expected, so the workaround is
trivial.  Presumably there is a regex or similar somewhere matching on just
digits/dots.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>