3198: Downloaded patch files contain hash values that don't match content
- Duplicate
- Review Board
cea***@gmai***** (Google Code) (Is this you? Claim this profile.) | |
2916 |
What version are you running? Review Board 1.7.13, RBTools 0.5.2 What's the URL of the page containing the problem? The issue exists in downloaded patch files. What steps will reproduce the problem? 1. In a Git repository, make a change to a file using CRLF line-endings. 2. Commit the change to your local repository. 3. Use post-review to post a review request for the change. 4. In review board, download the patch. What is the expected output? What do you see instead? It is expected that the hash values for changes in patch files match the hash values of the content represented. Because the line endings in the patch file are all LF line endings, the patch content hash does not match when a file is committed with CRLF line endings. What operating system are you using? What browser? Windows clients running Cygwin and using the Cygwin version of Git. Please provide any additional information below. I have written a Git commit hook to authorize push requests by verifying that the commits have been approved in Review Board. It expects to be called by the update hook as follows: #!/bin/bash python /usr/local/bin/verify-code-review.py $3 > ~/commit-test.txt exit $? I have attached the code for this, but the key problem is that the computed hashes in the code being committed, which is code applied by a developer downloading the patch from Review Board, applying it to a local Git branch and then pushing the changes to the central Git repository needs to have matching hash values for each file. This was the only way I could be sure that the patch that was approved in Review Board matches the patch being committed. So far, the only issue we have run into in the newlines not matching, unless LF newlines are used. We have considered using Git settings to force LF newlines to be used for committed code, but there may come a time when a particular file requires CRLF line endings and then we would have a problem.
-
- New + Duplicate -
+ 2916 - Review Board does not respect line endings