On 10/02/18 14:10, Marc-André Lureau wrote:
> Hi
> 
> On Tue, Oct 2, 2018 at 3:55 PM Laszlo Ersek <[email protected]> wrote:
>>
>> On 10/02/18 13:37, Marc-André Lureau wrote:
>>> On Tue, Oct 2, 2018 at 2:55 PM Laszlo Ersek <[email protected]> wrote:
>>
>>>> Please fix your git settings for your local edk2 clone. Your patch
>>>> contains context lines with LF (not CRLF) line endings, and that's not
>>>> correct for edk2.
>>>
>>> Shouldn't it be catched by: python BaseTools/Scripts/PatchCheck.py -1 ?
>>
>> Yes, it should be caught by "PatchCheck.py". The "force_crlf" member is
>> set iff the pathname doesn't end in ".sh", and then the
>> check_added_line() method verifies CRLF.
>>
>> I don't know why it doesn't work in practice. Can you submit a TianoCore
>> BZ about it?
>>
>> (Your patch uses LF on both context lines and new (added) lines, so the
>> current script logic should complain, yes.)
>>
>>> Hmm, this is weird, the original patch has crlf (see attach file).
>>> send-email or the mail server somehow stripped it?
>>>
>>> I use your recommend git settings, I don't know what I am missing here.
>>
>> You are right, the attachment looks fine.
>>
>> ... Can you resend the v2 patch (just to me directly, off-list) with
>>
>>   --transfer-encoding=quoted-printable
>>
>> ? My guess is that the base64 encoding in git-send-email includes an
>> automatic CR stripping phase.
> 
> Hmm, actually it's my emacs settings that stripped the crlf from the patch.
> 
> I edited the patch manually to add some notes...

Haha, serves you right then ;)

I suggest never editing patches after formatting them. In the first
place, there's no reason to: you can add, edit and remove notes on
commits with "git notes" (without changing the commit hashes / git
history). And "git-format-patch" takes a "--notes" option. (Same for
"git show".)

I do mention git-notes in the "unkempt guide":

git config notes.rewriteRef       refs/notes/commits

git format-patch                               \
  --notes                                      \

git notes edit COMMIT_HASH_OF_THAT_PATCH


Thanks for tracking this down!
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to