From: Torsten Bögershausen Date: Sat, 14 May 2016 05:40:11 GMT Subject: Re: Bug report: Duplicate CRLF rewrite warnings on commit Message-ID: <998a4fcd-ecd8-7e0c-860e-7f12ec02b1f9@web.de> In-Reply-To: On 13.05.16 18:43, Junio C Hamano wrote: > Adam Dinwoodie writes: > >> If you use .gitattributes to enable CRLF->LF rewriting, then commit a >> file that would have its line endings rewritten, the "CRLF will be >> replaced by LF" warning is printed several times over; I'd expect it to >> be printed only once. >> >> There's a test case in t0020 -- "safecrlf: print warning only once" -- >> that checks the warning is only printed once when using `git add`, but >> nothing that seems to check the same thing on `git commit`. The >> unnecessary multiple warnings seem to have existed since at least v1.6.0 >> (the warnings appear to have been added in v1.5.5 in 21e5ad5, but I >> couldn't get that to build on my current box), and I'm seeing them on my >> Cygwin box's build of the current next branch (d10caa2) and on my CentOS >> box's v2.8.1 release. > > Torsten, I know you are not heavily invested in "commit" codepath, > but since you've been actively touching the CRLF area, I wonder > perhaps you might be interested in taking a look? > I have seen this double warning as well, but never digged further, as it is most probably in the code outside convert.c I can put it on the TODO list, and I think it would make sense to add a TC in t0020, which is marked as test_expect_failure.