git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jens Bauer <jens-lists@gpio.dk>
To: Johannes Sixt <j6t@kdbg.org>
Cc: Jeff King <peff@peff.net>, Drew Northup <drew.northup@maine.edu>,
	git@vger.kernel.org
Subject: Re: CRLF, LF ... CR ?
Date: Thu, 13 Sep 2012 21:13:55 +0200	[thread overview]
Message-ID: <20120913211355575954.3979105b@gpio.dk> (raw)
In-Reply-To: <50522720.50204@kdbg.org>

Hi Johannes.

I've changed...
	tr '\\r' '\\n'
...to...
	tr '\\15' '\\12'

...As you are right in that it is more correct. (Then in theory, it would be portable).
[I once came across tftpd, tried compiling it on a Mac, but it failed to work, because \r and \n were swapped on the compiler, so I asked the author to use \15 and \12, which made it fully portable]

It now works even better. I can't and won't complain - thank you. =)


Love
Jens

On Thu, 13 Sep 2012 20:34:08 +0200, Johannes Sixt wrote:
> Am 13.09.2012 17:53, schrieb Jens Bauer:
>> Hi Jeff and Drew.
>> 
>> Thank you for your quick replies! :)
>> 
>> The diffs look nasty yes; that's my main issue.
>> It can be worked around in many ways; eg a simple (but time consuming) way:
>> $ git diff mypcb.osm >mypcb.diff && nano mypcb.diff
>> 
>> -It'd be better to just pipe it into a regex, which changes CR to LF 
>> on the fly.
>> 
>> OsmondPCB is able to read files that has mixed LF and CR. (By mixed, 
>> I do not talk about CRLF)
> 
> That is good news. Just write a 'clean' filter that amounts to
> 
>    tr '\015' '\012'
> 
> You don't need a 'smudge' filter that reverts this conversion.
> 
> -- Hannes
> 

  reply	other threads:[~2012-09-13 19:14 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-13 15:09 CRLF, LF ... CR ? Jens Bauer
2012-09-13 15:34 ` Drew Northup
2012-09-13 15:43   ` Jeff King
2012-09-13 15:53     ` Jens Bauer
2012-09-13 18:17       ` Jens Bauer
2012-09-13 18:23         ` Jeff King
2012-09-13 18:55           ` Jens Bauer
2012-09-13 18:34       ` Johannes Sixt
2012-09-13 19:13         ` Jens Bauer [this message]
2012-09-13 15:43   ` Erik Faye-Lund
2012-09-14  4:06 ` David Aguilar
2012-09-14  4:36   ` Jens Bauer
2012-09-14  4:51   ` Junio C Hamano
2012-09-26  8:42     ` David Aguilar
2012-09-26 10:12       ` Jens Bauer
2012-09-26 10:31         ` Jens Bauer
2012-09-27  6:16       ` Junio C Hamano
2012-09-27 13:42         ` Jens Bauer

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=20120913211355575954.3979105b@gpio.dk \
    --to=jens-lists@gpio.dk \
    --cc=drew.northup@maine.edu \
    --cc=git@vger.kernel.org \
    --cc=j6t@kdbg.org \
    --cc=peff@peff.net \
    /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 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).