From: Steffen Prohaska Date: Mon, 14 Jan 2008 06:53:13 GMT Subject: Re: [PATCH] Don't display crlf warning twice Message-ID: <004D2FB5-2CEA-4DB1-AF8D-D5ADEB0F0508@zib.de> In-Reply-To: <20080114064036.GX2963@dpotapov.dyndns.org> On Jan 14, 2008, at 7:40 AM, Dmitry Potapov wrote: > On Mon, Jan 14, 2008 at 07:17:26AM +0100, Steffen Prohaska wrote: >> >> Your traces reveal that it is a racy condition that can trigger >> the double warnings. > > It is not a racy condition. It is just another branch in the > code, which happens when an existing file is modified. Your > tests always added a new file, so they could not reproduce > the problem. > >> >> Do you have a test case that reliably triggers the second call to >> convert_to_git()? > > =========================================== > git config core.autocrlf input > > echo Hello > foo > git add foo > git commit -m 'add foo' > > echo Hello >> foo > unix2dos foo > # This should trigger double crlf warning > git add foo > =========================================== Yes, this reproduces the problem. Thanks, Steffen