Test PR after line ending normalization#12864
Conversation
|
I think we'll have to update all the PR's ourselves. Additionally, can you prepare an explainer comment that can be posted onto each PR? It might be possible to script this with |
|
@feerrenrut - What are your thoughts on the following? NVAccess has updated the NVDA repository to make the line endings normalized to LF.
This might help to make suggestions: - NVAccess has updated the NVDA repository to make the line endings normalized to LF.
- This created merge conflicts, which we have resolved using the methodology discussed in #12864.
- For more information see the following:
- * Project overview: #12387
- * Detailed implementation and justification: #12816.
+ NVAccess has updated the NVDA repository to make the line endings normalized to LF.
+ This created merge conflicts, which we have resolved using the methodology discussed in #12864.
+ For more information see the following:
+ * Project overview: #12387
+ * Detailed implementation and justification: #12816.I'll look into a script to perform this for all PRs. |
|
I have a major concern - how do we handle PRs that have merge conflicts currently? git checkout origin/master .gitattributes
git add --renormalize .
git commit -m "normalize line endings" |
|
When a PR has merge conflicts, either us or the author is expected to resolve. There probably needs to be a manual step to confirm that the merge went correctly. |
|
I don't think our script would work in this case, and we will not be able to merge in master to resolve conflicts created from the normalization. |
|
If we set |
This PR is a test sample for #12387
This PR simulates an open PR to master, of a branch created before normalization, after normalization has occurred on master.
In this case
test-normalized-line-endingshas had all line endings changed to LF using the process in #12816 - this simulates origin/master after normalization.test-branch-from-masterhas been branched from master, without normalization, and has had a small change applied to a file with CRLF line endings.This shows that line ending normalization will cause most current PRs to have merge conflicts.
As a strategy to handle this, branches should merge master in the following way.
This example uses these test branches, so that devs can confirm the process locally.
git config --local merge.renormalize truegit merge origin/test-normalize-line-endings # To be replaced with origin/masterIn summary, the final script will look something like
Message for contributors