From mboxrd@z Thu Jan 1 00:00:00 1970 From: Finn Arne Gangstad Subject: Re: [PATCH/RFC v2 1/4] Add "core.eolStyle" variable to control end-of-line conversion Date: Sun, 9 May 2010 22:09:37 +0200 Message-ID: <20100509200935.GA22563@pvv.org> References: <20100509070043.GB14069@dpotapov.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "git@vger.kernel.org List" , Dmitry Potapov , Linus Torvalds , mat , hasen j , Erik Faye-Lund , Junio C Hamano , Avery Pennarun , Robert Buck To: Eyvind Bernhardsen X-From: git-owner@vger.kernel.org Sun May 09 22:10:10 2010 connect(): No such file or directory Return-path: Envelope-to: gcvg-git-2@lo.gmane.org Received: from vger.kernel.org ([209.132.180.67]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1OBCp9-0002fz-SJ for gcvg-git-2@lo.gmane.org; Sun, 09 May 2010 22:10:04 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751178Ab0EIUJr (ORCPT ); Sun, 9 May 2010 16:09:47 -0400 Received: from decibel.pvv.ntnu.no ([129.241.210.179]:33051 "EHLO decibel.pvv.ntnu.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750701Ab0EIUJq (ORCPT ); Sun, 9 May 2010 16:09:46 -0400 Received: from finnag by decibel.pvv.ntnu.no with local (Exim 4.69) (envelope-from ) id 1OBCoj-0004Z3-UA; Sun, 09 May 2010 22:09:38 +0200 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17+20080114 (2008-01-14) Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org Archived-At: On Sun, May 09, 2010 at 12:42:17PM +0200, Eyvind Bernhardsen wrote: > I guess I should nail my flag to the mast: Here's what I would have > done, with the benefit of plenty of hindsight, had we not had > core.autocrlf, and also what I think we should do to approach that > ideal. > [...] After some meditation, I think the following: The most important thing is how we can fix git on Windows to operate well by default. This is what we really should try to fix. The way git on Windows would work best, while at the same time cause the minimum amount of damage, would IMHO be: - Convert LF-only text files to CRLF on checkout - Convert those same files (but only those!) back to LF on commit - Optionally: Convert new CRLF text files to LF on commit And all this should happen without setting any configuration, and not setting any attributes. So maybe, just maybe, we can make everything sufficiently good by repairing "core.autocrlf = {input,true}" so that git will not convert a CRLF already in the repo. This would make autocrlf = true a safe default value (and probably input too, but you'd have to "do something" to get a new text file with CRLF into the repo then). Then we go from a situation that didn't work, to a working situation, and break nothing that used to work. You no longer have to normalise your repos to work from Windows. - Finn Arne