From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marius Storm-Olsen Subject: Re: [PATCH 3/3] Teach "git branch" about --new-workdir Date: Tue, 24 Jul 2007 15:26:08 +0200 Message-ID: <46A5FDF0.3060801@trolltech.com> References: <20070723035644.GC32566@spearce.org> <7v1wezohi4.fsf@assigned-by-dhcp.cox.net> <46A5B5F5.6000202@trolltech.com> <7vd4yigmla.fsf@assigned-by-dhcp.cox.net> <46A5DF1F.2030307@trolltech.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig30FE726CABDB345F6A146573" Cc: Junio C Hamano , "Shawn O. Pearce" , Julian Phillips , git@vger.kernel.org To: Johannes Schindelin X-From: git-owner@vger.kernel.org Tue Jul 24 15:25:38 2007 Return-path: Envelope-to: gcvg-git@gmane.org Received: from vger.kernel.org ([209.132.176.167]) by lo.gmane.org with esmtp (Exim 4.50) id 1IDKOP-0002FJ-H2 for gcvg-git@gmane.org; Tue, 24 Jul 2007 15:25:37 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753345AbXGXNZe (ORCPT ); Tue, 24 Jul 2007 09:25:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755889AbXGXNZe (ORCPT ); Tue, 24 Jul 2007 09:25:34 -0400 Received: from esparsett.troll.no ([62.70.27.18]:47930 "EHLO esparsett.troll.no" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752397AbXGXNZd (ORCPT ); Tue, 24 Jul 2007 09:25:33 -0400 Received: from esparsett.troll.no (localhost [127.0.0.1]) by localhost (Postfix) with SMTP id 66AD074286; Tue, 24 Jul 2007 15:25:32 +0200 (CEST) Received: from [10.3.4.215] (error.troll.no [10.3.4.215]) by esparsett.troll.no (Postfix) with ESMTP id 50C8474284; Tue, 24 Jul 2007 15:25:32 +0200 (CEST) User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.5) Gecko/20070716 Thunderbird/2.0.0.5 Mnenhy/0.7.5.666 In-Reply-To: X-Enigmail-Version: 0.95.2 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAFVBMVEXU1NTAwMABAQGsrKyE hIQwMDAEBAS8hGUfAAACQUlEQVQ4jV2TS47cMAxEKSDZW1CfwMB4PYLkrKchsveJRR2gEen+R0hR 9vziBmahhyqSRQ4NfF1FmIv3dH4usNAGoFprBVguQJmZ1nX0XiHgEukTCK3TairiZeXcVGzmZIoU 3738pehdVbiU9KFgMQWeZ1fpHZDfRS4rPb3eQVaZChGx4ikt5GDkAZQ2KKohzjklno4+iJpVhxka ZjSpasJ4gdGaEQMWTMjRa5uTqza0XDJjzhIdzGTMrqoopimoIPCKZtVOq265MAXpMLXycmVl2Y8C oE1FkT/faKauOjYoHJyOxHfvixjowvI0xZJsKykubgLYzuJMdBO+L86TjxfQ9hz9jpSudbnXXzRm tor5i3MUONpOfARAhlWbzWF7OhP2eSeEW9HUBNiHOxUM8HLWHhUAj3NZNsdqRZpNA+DJ+XlX+Qc9 Z4ZjHX8LRUzgTBBef84NQoCMOcS0+BMsj3klbTzRri03ugXr9em1GfgzDAyEn4J3fvFI5YwdTrYu 1ntAY1h5ysM2OMGm+cBOocCXHisAHu2PagnLghoG2krz8bzsA4fj7KxCGk+63jt+DDCtYjbFNkHD nRwpRqsQYx5WYzsbm/eBfn0I4TbOGvMWqhQAiEDzNs4apumCI0x2OyHtY7uAlZff/sanbH9+AGT1 KOEmUlJISdYPgEgehw+cTZEf6xeFyoEjCPgv+A62KhW3EOy9PL7WmCBMRWmfYN0OqW9krzl/Ay91 75HMqfDtP8UFckFUX2rwrm/kTVB2gH+hdu4avZVCuAAAAABJRU5ErkJggg== Sender: git-owner@vger.kernel.org Precedence: bulk X-Mailing-List: git@vger.kernel.org Archived-At: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig30FE726CABDB345F6A146573 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable > BTW a friend reported a CRLF issue on Windows, _in spite_ of > setting the gitattributes appropriately... Did you ever get > something like that? Hmm, I haven't really had problems with the gitattributes files in the=20 directory of the file to be ignored, but rather .git/info/attributes. There I have had problems with directories containing spaces. The=20 escaping of the spaces doesn't work, so even if you do foo/bar\ baz/file.txt -crlf it doesn't work. So, you have to do foo/*/file.txt -crlf instead. I mainly have the problem with the following: 1) User on Windows is using MinGW port or Cygwin setup with DOS EOL. 2) Has core.autocrlf=3Dtrue 3) Files for XML testcases (for example) is checked into repo on Linux (File contains CRLF EOL, since its crucial for testing the XML parser) 4) git diff shows all lineending changed, since the autocrlf tries to convert the files which are really checked into the repo with DOS EOL. 5) You end up adding a bunch of foo/bar/baz/* -crlf into your .git/info/attributes file or the like. So, it's look like this ('yes' mean CRLF EOL): Repo | Working dir | Convert EOL? --------------------------------- 1) - LF no 2) - CRLF yes 3) LF LF no 4) LF CRLF yes 5) CRLF LF no 6) CRLF CRLF yes The problem is that currently 6) is 'yes', and turns the file into a=20 LF file, which it shouldn't. So, to fix the problem the crlf convertor should really check if the=20 file has crlf EOL in the repo, if so, avoid EOL conversion. (6) should=20 be 'no' :-) --=20 =2Emarius --------------enig30FE726CABDB345F6A146573 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (MingW32) iD8DBQFGpf3wKzzXl/njVP8RAncNAKCNXJOQ8pBTZoAmncvI0A7Z/vUM8ACg+JIN 758jxLaRX3QpCBViwkJfv+c= =81Ah -----END PGP SIGNATURE----- --------------enig30FE726CABDB345F6A146573--