git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* git-am and CRLF
@ 2013-03-13 16:54 Erik Faye-Lund
  2013-03-13 17:42 ` Brandon Casey
  0 siblings, 1 reply; 3+ messages in thread
From: Erik Faye-Lund @ 2013-03-13 16:54 UTC (permalink / raw)
  To: GIT Mailing-list

I recently tried to apply a patch-series to a repo that is
unfortunately full of CRLF files, and was a bit surprised that it
didn't work at all.

So I made a small repro-case, and it seems CRLF new-lines is indeed
the problem. Any clue how to fix it? The way I see it, we should
simply be able top treat the CR as any other character, and succeed.
But that doesn't seem to happen...

git init test &&
(
        cd test/ &&
        git config core.autocrlf false &&
        printf "%s\r\n%s\r\n" "foo" "bar" > test.txt &&
        git add test.txt &&
        git commit -m. &&
        printf "%s\r\n%s\r\n%s\r\n" "foo" "baz" "bar" > test.txt &&
        git commit -am. &&
        git format-patch -1 &&
        git reset --hard HEAD^ &&
        git am 0001-.patch
)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-13 17:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-13 16:54 git-am and CRLF Erik Faye-Lund
2013-03-13 17:42 ` Brandon Casey
2013-03-13 17:46   ` Erik Faye-Lund

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).