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.3 required=3.0 tests=AWL,BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI 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 6D2DB1F51C for ; Fri, 18 May 2018 15:04:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751429AbeERPEA (ORCPT ); Fri, 18 May 2018 11:04:00 -0400 Received: from mout.web.de ([217.72.192.78]:47501 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750975AbeERPD7 (ORCPT ); Fri, 18 May 2018 11:03:59 -0400 Received: from [192.168.209.20] ([195.198.252.176]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0LeLKb-1eU6t60ag1-00qCkc; Fri, 18 May 2018 17:03:57 +0200 Subject: Re: git diff: meaning of ^M at line ends ? To: =?UTF-8?Q?Frank_Sch=c3=a4fer?= , git@vger.kernel.org References: <6c23ed9e-4a14-12e4-20ca-3ac6f80cf9ec@googlemail.com> <8d7e4807-9a79-e357-8265-95f22ab716e0@web.de> From: =?UTF-8?Q?Torsten_B=c3=b6gershausen?= Message-ID: Date: Fri, 18 May 2018 17:03:50 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.7.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:K1:sZP7IB5QrNMVV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5q8G Sender: git-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: git@vger.kernel.org On 15.05.18 20:04, Frank Schäfer wrote: > Am 14.05.2018 um 20:13 schrieb Torsten Bögershausen: >> ^M is the representation of a "Carriage Return" or CR. >> Under Linux/Unix/Mac OS X a line is terminated with a single >> "line feed", LF. >> >> Windows typically uses CRLF at the end of the line. >> "git diff" uses the LF to detect the end of line, >> leaving the CR alone. >> >> Nothing to worry about. > Thanks, I already suspected something like that. > Has this behavior been changed/added recently ? That is a good question. There is, to my knowledge, no intentional change. > I didn't observe it before, although the project I'm currently looking > into has always been using CR+LF... Do you mean that older versions did behave differently ? Do you have a version number for the "old" handling ? > > Why does the ^M only show up in '+' lines ? > When changing the line end from CR+LF to LF, the diff looks like this: > > -blahblah > +blahblah > > But I would expect it to be > > -blahblah^M > +blahblah May be this helps (I haven't tested it) ? git config core.whitespace cr-at-eol