Hi Junio, On Mon, 8 May 2017, Junio C Hamano wrote: > Johannes Schindelin <johannes.schindelin@xxxxxx> writes: > > > The test t4051-diff-function-context.sh passes on Linux when > > core.autocrlf=true even without marking its support files as LF-only, > > but they fail when core.autocrlf=true in Git for Windows' SDK. > > > > The reason is that `grep ... >file.c.new` will keep CR/LF line endings > > on Linux (obviously treating CRs as if they were regular characters), > > but will be converted to LF-only line endings with MSYS2's grep that > > is used in Git for Windows. > > Ahem. > > I thought that according to your claim a UNIX tool like "grep" would > alway use LF endings? ;-) The maintainers of the MSYS2 grep package apparently disagree with me on that point. You should be familiar with that reaction. > > As we do not want to validate the way the available `grep` works, > > let's just mark the input as LF-only and move on. > > I agree with this conclusion; just like we do not want to worry about > how `grep` works when given CRLF files in this patch, we do not want to > worry about how other commands like `sh` works when given CRLF files. > And that is consistent with the overall theme of this series that marked > *.sh, *.perl and other files with eol=lf attribute. Good. That agreement is something on which you and I can build. > The only question I still have with this series is about the > README/COPYING thing. I _think_ it was my ancient mistake to use the > toplevel README and COPYING as test files, and that mistake was > corrected by somebody else earlier by having a frozen copy in > t/diff-lib/ and making tests use these files from that directory. If we > broke our tests to again use these files from outside t/diff-lib/, then > we would need to fix the tests not to do so. And if we are only looking > at t/diff-lib/ copy, then I think it is more consistent with the rest of > this series to mark them with eol=lf rather than passing them through > "tr -d '\015'". Thank you for pointing out that the README and COPYING files were reproduced in t/diff-lib/ specifically to serve as files for use in the tests. It had not really occurred to me, as I mistook this to be an extra anal licensing clarification for the diff-lib ;-) I will "re-roll" the patch series, dropping the ugly tr calls and marking t/diff-lib/* as LF-only, as you suggested. Ciao, Dscho