[FFmpeg-devel] [PATCH] gitattributes - force LF for some FATE srt and webvtt refs

Gyan Doshi gyandoshi at gmail.com
Sat Apr 7 14:03:24 EEST 2018


Please first read the commit msg below, which is, I hope, 
self-explanatory, but I want to note a few things.

When searching to see how this issue was addressed in the past, I saw 
the recommendation was to set git global autocrlf to false. That's 
inadvisable because it affects checkout/clones of all other repos that 
the Windows user has. Setting repo local autocrlf to false is preferable 
but any local edits with CRLF will be merged unchanged.

So the safe alternative to this patch is to set local autocrlf to input 
for Windows users and document that clearly in both Git How-to and 
ffmpeg-web.git/src/download. gitattributes will have to track any 
deliberate CRLF files.

Regards,
Gyan
-------------- next part --------------
From e273754f53f2ad937e2ea05304dd554747fdc792 Mon Sep 17 00:00:00 2001
From: Gyan Doshi <gyandoshi at gmail.com>
Date: Sat, 7 Apr 2018 13:31:55 +0530
Subject: [PATCH] gitattributes - force LF for some FATE srt and webvtt refs

The SRT and WebVTT muxers only write out LF line endings.
On Windows, the refs for a few related FATE tests are
checked out, by default, as CRLF, causing these tests to fail.

Patch forces these files to be checked out as LF.
---
 .gitattributes | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.gitattributes b/.gitattributes
index 5a19b963b6..59e20ffc92 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,6 @@
 *.pnm -diff -text
 tests/ref/fate/sub-scc eol=crlf
+tests/ref/fate/sub-srt-empty-events eol=lf
+tests/ref/fate/sub-srt-madness-timeshift eol=lf
+tests/ref/fate/sub-srt-rrn-remux eol=lf
+tests/ref/fate/sub-webvttenc eol=lf
-- 
2.12.2.windows.2


More information about the ffmpeg-devel mailing list