From: "Torsten Bögershausen" <tboegi@web.de>
To: Soul Trace <S-trace@list.ru>
Cc: git@vger.kernel.org
Subject: Re: [BUG] git am sometimes unable to apply git format-patch output file
Date: Sat, 12 Aug 2017 19:01:36 +0200 [thread overview]
Message-ID: <20170812170136.GB21045@tor.lan> (raw)
In-Reply-To: <20170812162023.GA21045@tor.lan>
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
next prev parent reply other threads:[~2017-08-12 17:07 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-12 16:02 [BUG] git am sometimes unable to apply git format-patch output file Soul Trace
2017-08-12 16:20 ` Torsten Bögershausen
2017-08-12 17:01 ` Torsten Bögershausen [this message]
2017-08-16 7:45 ` Soul Trace
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170812170136.GB21045@tor.lan \
--to=tboegi@web.de \
--cc=S-trace@list.ru \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.