From: Johannes Schindelin Date: Mon, 04 Jan 2016 12:27:44 GMT Subject: Re: [PATCH v2 16/17] grep: read -f file with strbuf_getline_crlf() Message-ID: In-Reply-To: <1450303398-25900-17-git-send-email-gitster@pobox.com> Hi Junio, On Wed, 16 Dec 2015, Junio C Hamano wrote: > This is iffy; you may actually be trying to find a line with ^M in > it on a system whose line ending is LF. You can of course work it > around by having a line that has "^M^M^J", let the strbuf_getline_crlf() eat > the last "^M^J", leaving just the single "^M" as the pattern. Thanks for being careful. Having said that, `grep` operates on lines of text, and CR is established as a non-text byte, so I would argue that the previous behavior was actually incorrect: if you searched for, say, `abc$` in a CR/LF delimited file, the outcome would not have met my expectation of correct behavior. Ciao, Dscho