Labels: Type-Defect Priority-Medium
New issue 3198 by cea...@gmail.com: Downloaded patch files contain hash
values that don't match content
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:
python /usr/local/bin/verify-code-review.py $3 > ~/commit-test.txt
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.
verify-code-review.py 2.3 KB
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
You received this message because you are subscribed to the Google Groups
To unsubscribe from this group and stop receiving emails from it, send an email
To post to this group, send email to firstname.lastname@example.org.
Visit this group at http://groups.google.com/group/reviewboard-issues.
For more options, visit https://groups.google.com/groups/opt_out.