[FFmpeg-devel] [FFmpeg-cvslog] lavf/assenc: normalize line endings to \n

Ridley Combs rcombs at rcombs.me
Tue Feb 13 14:08:32 EET 2024



> On Feb 13, 2024, at 01:28, Anton Khirnov <anton at khirnov.net> wrote:
> 
> Quoting Martin Storsjö (2024-02-12 12:31:29)
>> On Mon, 12 Feb 2024, Hendrik Leppkes wrote:
>> 
>>> On Mon, Feb 12, 2024 at 11:22 AM Martin Storsjö <martin at martin.st> wrote:
>>>>> 
>>>>> diff --git a/.gitattributes b/.gitattributes
>>>>> index 5a19b963b6..a900528e47 100644
>>>>> --- a/.gitattributes
>>>>> +++ b/.gitattributes
>>>>> @@ -1,2 +1 @@
>>>>> *.pnm -diff -text
>>>>> -tests/ref/fate/sub-scc eol=crlf
>>>> 
>>>> This change seems to have had a tricky effect on the
>>>> tests/ref/fate/sub-scc file. Previously, when checked out, users got the
>>>> file with CRLF newlines. When updating to this git commit, or past it,
>>>> that file remains untouched, with CRLF still present, and the
>>>> fate-sub-scc test fails. If one does "rm tests/ref/fate/sub-scc; git
>>>> checkout tests/ref/fate/sub-scc", then the file does get restored with LR
>>>> newlines, and the test passes.
>>>> 
>>>> It's easy to do this change manually in the source checkout of a fate
>>>> runner, but I'm not sure how easily we get all fate instances fixed that
>>>> way - currently this test is failing in most of them.
>>>> 
>>> 
>>> Can this be fixed by restoring the .gitattribute entry but with eol=lf?
>>> Not sure if Git would reset the file then.
>> 
>> No, that doesn't seem to make any difference. Not sure if there are any 
>> other straightforward/elegant fixes, short of renaming the file, which I 
>> guess would require renaming the test itself.
> 
> I'm fine with renaming the test, unless anyone has a better fix.

We could probably tweak the fate runner script to make sure this gets fixed up; can anyone try this patch on one of the affected machines? https://gist.github.com/rcombs/c2ad470bf36c5cbd3fc33e699330eb15

Alternately, we could set -text on all fate ref files, or explicitly set eol=of for them, to ensure their line endings never get rewritten like this regardless of git config. I think either of these solutions would fix this in fate, but only after the fix commit gets checked out *followed by* at least one other commit.

> 
> -- 
> Anton Khirnov
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org <mailto:ffmpeg-devel at ffmpeg.org>
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org <mailto:ffmpeg-devel-request at ffmpeg.org> with subject "unsubscribe".



More information about the ffmpeg-devel mailing list