From: "Martin Storsjö" <martin@martin.st> To: Ridley Combs via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [FFmpeg-cvslog] lavf/assenc: normalize line endings to \n Date: Tue, 13 Feb 2024 14:33:50 +0200 (EET) Message-ID: <d84b9e8f-ffbc-9823-426e-e2d9e7fefa44@martin.st> (raw) In-Reply-To: <072001FE-0438-47B8-AE5A-004F59205068@rcombs.me> On Tue, 13 Feb 2024, Ridley Combs via ffmpeg-devel wrote: >> On Feb 13, 2024, at 01:28, Anton Khirnov <anton@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@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 That doesn't seem to make any difference. Also, updating fate.sh doesn't necessarily propagate automatically to runners - in order to run fate, one needs to run fate.sh before it even clones/checks out the directory where it fetches the latest source. So unless one later has changed one's setup, to invoke a fate.sh from the checkout, most fate runners just use whatever copy of fate.sh they had when it was set up. > 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. Neither of those seem to make any difference either. It's quite easy to test for one self: $ git checkout -b experiment $ <commit change to .gitattributes> $ <commit another stray change if necessary> $ git checkout 7bf1b9b3576~ # Reset original state, for testing $ rm tests/ref/fate/sub-scc; git checkout tests/ref/fate/sub-scc $ vi tests/ref/fate/sub-scc # inspect that the file originally has CRLF $ git checkout experiment~ # check out the commit setting attributes $ git checkout experiment # check out the next commit, with the new attributes set $ vi tests/ref/fate/sub-scc # observe that the file still has CRLF $ git checkout --detach $ git -c core.autocrlf=false reset --hard 7bf1b9b3576 $ vi tests/ref/fate/sub-scc # observe that the file still has CRLF It seems to me (I haven't trid to dig into manuals) that the attribute gets stuck in whatever form it was when the file was first created in the workdir. E.g. doing a "git checkout d1df72a702~" (the commit before the file was originally added) followed by "git checkout 7bf1b9b3576" does fix it. This is at least observed with git 2.25.1. Not sure if this is intended behaviour or a bug from git's side. // Martin _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-02-13 12:34 UTC|newest] Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top [not found] <20240212010139.5B289411B94@natalya.videolan.org> 2024-02-12 10:22 ` Martin Storsjö 2024-02-12 10:51 ` Hendrik Leppkes 2024-02-12 11:31 ` Martin Storsjö 2024-02-13 9:28 ` Anton Khirnov 2024-02-13 12:08 ` Ridley Combs via ffmpeg-devel 2024-02-13 12:33 ` Martin Storsjö [this message] 2024-02-13 12:48 ` Ridley Combs via ffmpeg-devel 2024-02-13 13:29 ` Martin Storsjö 2024-02-13 15:22 ` Martin Storsjö
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=d84b9e8f-ffbc-9823-426e-e2d9e7fefa44@martin.st \ --to=martin@martin.st \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git