From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by dcvr.yhbt.net (Postfix) with ESMTP id C45891F43C for ; Tue, 14 Nov 2017 17:10:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755884AbdKNRKB (ORCPT ); Tue, 14 Nov 2017 12:10:01 -0500 Received: from mout.web.de ([212.227.15.3]:50472 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754291AbdKNRJ7 (ORCPT ); Tue, 14 Nov 2017 12:09:59 -0500 Received: from macce.local ([195.198.252.176]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0Ll30X-1eoosq3yB3-00ajUI; Tue, 14 Nov 2017 18:09:58 +0100 Subject: Re: Changing encoding of a file : What should happen to CRLF in file ? To: Ashish Negi Cc: git@vger.kernel.org References: <8b3225ce-a4aa-56ee-5296-6cc7528556d1@web.de> From: =?UTF-8?Q?Torsten_B=c3=b6gershausen?= Message-ID: Date: Tue, 14 Nov 2017 18:09:57 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K0:aivlozPhPoGzgNjXPuRvQa5VwNFQUM698T/Fo5yNBH0CZYofMGO b9Vk9NwvVS66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s= Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org (Back to the beginning) You have a file ApplicationManifest.xml It is encoded in UTF-16 (and has CRLF) You convert it into UTF-8 The file has still CRLF (in the worktree) Now you add it and make a commit. Under both Linux and Windows you have "text=auto". I assume that you have efficiently core.eol=lf under Linux and core.eol=crlf on Windows. (That is the default, when you don't change anything) Now, what happens to the CRLF? If you commit the file, it will be stored with LF in the index, on both systems. On checkout, Windows will convert them into CRLF, but Linux will not. That why you see >On linux, during committing i get warning : warning: CRLF will be >replaced by LF in …file_name.. All in all there is nothing wrong, at least as I see it. The question remains: Do you need CRLF in Linux ? Probably not, but if yes, plase add a line *.xml text eol=crlf to your .gitattributes Otherwise your .gitconfig looks good to me.