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 1742D208B8 for ; Sat, 12 Aug 2017 17:07:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751780AbdHLRBk (ORCPT ); Sat, 12 Aug 2017 13:01:40 -0400 Received: from mout.web.de ([217.72.192.78]:49892 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751400AbdHLRBj (ORCPT ); Sat, 12 Aug 2017 13:01:39 -0400 Received: from localhost ([195.198.252.176]) by smtp.web.de (mrweb101 [213.165.67.124]) with ESMTPSA (Nemesis) id 0M5wrF-1dR6L221aj-00xud5; Sat, 12 Aug 2017 19:01:37 +0200 Date: Sat, 12 Aug 2017 19:01:36 +0200 From: Torsten =?iso-8859-1?Q?B=F6gershausen?= To: Soul Trace Cc: git@vger.kernel.org Subject: Re: [BUG] git am sometimes unable to apply git format-patch output file Message-ID: <20170812170136.GB21045@tor.lan> References: <20170812162023.GA21045@tor.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20170812162023.GA21045@tor.lan> User-Agent: Mutt/1.5.23 (2014-03-12) X-Provags-ID: V03:K0:t2KZJvlu3PwCNUi9ai3m+TY/qxW+P+SghQgijmz99/4bn7YWfa/ ne7jGBB6WaJ9QxxTb860IwpQFzXEhvx5z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-Mailing-List: git@vger.kernel.org On Sat, Aug 12, 2017 at 06:20:23PM +0200, Torsten Bögershausen wrote: > On Sat, Aug 12, 2017 at 07:02:59PM +0300, Soul Trace wrote: > > Hello. > > > > Using git i have found that git am command may sometimes fail to apply patch > > file which was created by the git am command. > > > > > > Steps to reproduce: > > Excellent, thanks so much for the detailed bug report. > This kind of information is really appreciated. > > Why did I say excellent ? > Because I am working on a patch, which -should- fix exactly this kind of issues. > I send out a patch earlier this day, but it doesn't fix your issue, even if it should. > I hope to have a fix soonish. I need to correct mysef, a litte bit, this doesn't seem to be a bug, but a feature. There are 2 things to be noticed: - The xml file has been commited with CRLF - git am strips the CR (because they -may- have been added by a mail program) There are 2 different solutions: a) Use git am --keep-cr b) "Normalize" the xml file(s), and commit them to have LF in the repo, they can still have CRLF in the work tree, if needed. This is done by echo "*.xml text" >>.gitattributes touch *.xml git add *.xml .gitattributes git commit -m "Normalize xml files" If you really need the xml files with CRLF, use this line instead: echo "*.xml eol=CRLF" >>.gitattributes HTH /Torsten