From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from cloud.peff.net (cloud.peff.net [217.216.95.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4E9FD13D51E for ; Tue, 11 Aug 2026 03:40:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.216.95.84 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786419611; cv=none; b=BWPsLRrdseZfB4GN8U/6XS2IZEQYbJjgVM85UTbYcHHIfPw6C0y+bwT/nQQYaDBaa79W2ylvlGNsjli0IKmGNrWzt1gAbv/04ryPMgmPVZdhGH5dKBRj7vY4Cf3sbl+lJsQxY7itcDEXErhyn+HSWndWLfvBDYAP1Z6PrCmVkUk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786419611; c=relaxed/simple; bh=5wxCOGQ3oluzGK0sIxirj8jHK+9jZU0c9EsxtLNUgAM=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=U0J4CktjHvYDPwoHyls5PSo/0MW51TsSRO1URnqTOqIB39TarbzLdktqIFiIPhoE5BfOga3hGpDgySp1TXByklEH1IWXV+AlUeT1pnqs9O0kCk/+tfJXouHfOcufYPpuL5KI+bWYvL0kS8o0RQA95V1E52zyMSTCGq8MMpXTX2k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=peff.net; spf=pass smtp.mailfrom=peff.net; dkim=pass (2048-bit key) header.d=peff.net header.i=@peff.net header.b=LuUIs0N/; arc=none smtp.client-ip=217.216.95.84 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=peff.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=peff.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=peff.net header.i=@peff.net header.b="LuUIs0N/" Received: (qmail 31048 invoked by uid 106); 11 Aug 2026 03:40:01 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=peff.net; h=date:from:to:cc:subject:message-id:references:mime-version:content-type:in-reply-to; s=20240930; bh=5wxCOGQ3oluzGK0sIxirj8jHK+9jZU0c9EsxtLNUgAM=; b=LuUIs0N/Ko48jSoosH9H3MfmUemCvZrxGGHrHzXGw0ifqhTHvaMNNQNzkpi/Mv90eTsocsM0cyCUaMaq6K5OrpnouL0uQgkBCZNMSpIb6rWZayfYTYeqUqwIey8mVP5Z6vJUc9PLX5uMx1J+RNkFy8FyoK9oJlEebKJCrrs+ST8yUqS9kXUbqWP+btr0aJbEmq9bMDeNWsl6Xhtoe81yODk+Ney56VFh5SGXVua6OImGThcW1BIoxRhVMPDZO7j0jMP+DHcn4M9W2DwFLILzsqV3U5eMnovyy8ZGJWkk3pxhWmZxZJiremUzzkh9rDQZ4OYpFMLtts65HeLMZqTZLQ== Received: from Unknown (HELO peff.net) (10.0.1.2) by cloud.peff.net (qpsmtpd/0.94) with ESMTP; Tue, 11 Aug 2026 03:40:01 +0000 Authentication-Results: cloud.peff.net; auth=none Received: (qmail 4946 invoked by uid 111); 11 Aug 2026 03:40:04 -0000 Received: from coredump.intra.peff.net (HELO coredump.intra.peff.net) (10.0.0.2) by peff.net (qpsmtpd/0.94) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPS; Mon, 10 Aug 2026 23:40:04 -0400 Authentication-Results: peff.net; auth=none Date: Mon, 10 Aug 2026 23:40:01 -0400 From: Jeff King To: Skybuck Flying Cc: Git Subject: Re: AI Textconv filter misconfiguration on Windows leads to silent corruption of diff output (ongoing investigation) Message-ID: <20260811034001.GA15552@coredump.intra.peff.net> References: Precedence: bulk X-Mailing-List: git@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: On Tue, Aug 11, 2026 at 12:44:42AM +0000, Skybuck Flying wrote: > - compareCache appeared as compaeCache > - return appeared as eturn > - from appeared as fom > - var appeared as va > - for appeared as fo > - cacheReader appeared as cacheReade > - CompareAndSwap appeared as CompaeAndSwap So all of your r's are gone... > Global .gitconfig: > diff.lfclean.textconv=sed -e s/\r// ...and here you don't quote against the shell. So the shell is probably converting "\r" into just "r", and thus sed is removing them. The same thing would be a problem on Linux as well as Windows. I felt clever at spotting this immediately, but then this is already in your text later: > So the command does strip the literal character 'r' instead of > carriage returns. The likely reason is that the backslash before r is > not preserved through the shell argument parsing on Windows; > effectively, the expression becomes s/r//, which deletes all 'r' > characters. So...what's the question? This is a misconfiguration on your part. Perhaps Git's documentation could be more clear that there will be a shell involved, but using a shell is normal for (almost) all user-specified commands run by Git. -Peff