Re: Please make git-am handle \r\n-damaged patches

7 messages, 5 authors, 2016-06-15 · open the first message on its own page

Re: Please make git-am handle \r\n-damaged patches

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:47:08

"H. Peter Anvin" [off-list ref] writes:
In a serious case of craniorectal immersion, the Thunderbird developers
have started using \r\n line endings on saved emails:

https://bugzilla.mozilla.org/show_bug.cgi?id=503271
https://bugzilla.mozilla.org/show_bug.cgi?id=507530

It would be nice if git-am could handle this case automatically.
Perhaps

    $ dos2unix *.eml | git am

Re: Please make git-am handle \r\n-damaged patches

From: Wesley J. Landaker <hidden>
Date: 2016-06-15 22:47:08

On Monday 03 August 2009 15:30:38 Junio C Hamano wrote:
"H. Peter Anvin" [off-list ref] writes:
quoted
In a serious case of craniorectal immersion, the Thunderbird developers
have started using \r\n line endings on saved emails:

https://bugzilla.mozilla.org/show_bug.cgi?id=503271
https://bugzilla.mozilla.org/show_bug.cgi?id=507530

It would be nice if git-am could handle this case automatically.
Perhaps

    $ dos2unix *.eml | git am
I didn't try it, but would "git am" with "apply.whitespace" and 
"core.whitespace" set in some reasonable manner help? Not "automatic", but 
may help if dos2unix isn't available for some reason.

Re: Please make git-am handle \r\n-damaged patches

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:47:08

On 08/03/2009 02:30 PM, Junio C Hamano wrote:
"H. Peter Anvin" [off-list ref] writes:
quoted
In a serious case of craniorectal immersion, the Thunderbird developers
have started using \r\n line endings on saved emails:

https://bugzilla.mozilla.org/show_bug.cgi?id=503271
https://bugzilla.mozilla.org/show_bug.cgi?id=507530

It would be nice if git-am could handle this case automatically.
Perhaps

    $ dos2unix *.eml | git am
Yes, that's what they suggested, too.  Like I need an extra step in my
patch process.

	-hpa

Re: Please make git-am handle \r\n-damaged patches

From: Sverre Rabbelier <hidden>
Date: 2016-06-15 22:47:08

Heya,

On Mon, Aug 3, 2009 at 15:13, H. Peter Anvin[off-list ref] wrote:
Yes, that's what they suggested, too.  Like I need an extra step in my
patch process.
Write your own git-lazy-am.sh and put it in your path?

cat > git-lazy-am.sh << EOF
#!/bin/bash

dos2unix "$@" | git am
EOF

-- 
Cheers,

Sverre Rabbelier

Re: Please make git-am handle \r\n-damaged patches

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:47:08

On 08/03/2009 03:21 PM, Sverre Rabbelier wrote:
Heya,

On Mon, Aug 3, 2009 at 15:13, H. Peter Anvin[off-list ref] wrote:
quoted
Yes, that's what they suggested, too.  Like I need an extra step in my
patch process.
Write your own git-lazy-am.sh and put it in your path?

cat > git-lazy-am.sh << EOF
#!/bin/bash

dos2unix "$@" | git am
EOF
Yes, I can do that.  However, having this integrated into git am would
be nicer not just for me but for everyone else.

(Currently I'm just using apply.whitespace = fix, which also solves the
issue.)

	-hpa

Re: Please make git-am handle \r\n-damaged patches

From: "H. Peter Anvin" <hpa@zytor.com>
Date: 2016-06-15 22:47:08

On 08/03/2009 02:56 PM, Wesley J. Landaker wrote:
On Monday 03 August 2009 15:30:38 Junio C Hamano wrote:
quoted
"H. Peter Anvin" [off-list ref] writes:
quoted
In a serious case of craniorectal immersion, the Thunderbird developers
have started using \r\n line endings on saved emails:

https://bugzilla.mozilla.org/show_bug.cgi?id=503271
https://bugzilla.mozilla.org/show_bug.cgi?id=507530

It would be nice if git-am could handle this case automatically.
Perhaps

    $ dos2unix *.eml | git am
I didn't try it, but would "git am" with "apply.whitespace" and 
"core.whitespace" set in some reasonable manner help? Not "automatic", but 
may help if dos2unix isn't available for some reason.
It works, but it's extremely noisy.

	-hpa

Re: Please make git-am handle \r\n-damaged patches

From: Paolo Bonzini <hidden>
Date: 2016-06-15 22:47:08

On 08/04/2009 12:21 AM, Sverre Rabbelier wrote:
Heya,

On Mon, Aug 3, 2009 at 15:13, H. Peter Anvin[off-list ref]  wrote:
quoted
Yes, that's what they suggested, too.  Like I need an extra step in my
patch process.
Write your own git-lazy-am.sh and put it in your path?

cat>  git-lazy-am.sh<<  EOF
#!/bin/bash

dos2unix "$@" | git am
EOF
Even better than putting it on the path,

[alias]
	tbam = ~/libexec/git/git-lazy-am.sh

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help