From: Junio C Hamano <gitster@pobox.com>
To: arjen@yaph.org (Arjen Laarhoven)
Cc: Brandon Casey <casey@nrlssc.navy.mil>, git@vger.kernel.org
Subject: Re: [PATCH] t6023-merge-file: Work around non-portable sed usage
Date: Mon, 08 Sep 2008 12:26:32 -0700 [thread overview]
Message-ID: <7vej3ufnh3.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <20080908192313.GB4148@regex.yaph.org> (Arjen Laarhoven's message of "Mon, 8 Sep 2008 21:23:13 +0200")
arjen@yaph.org (Arjen Laarhoven) writes:
> On Mon, Sep 08, 2008 at 02:06:02PM -0500, Brandon Casey wrote:
> [...]
>> I was just encountering this myself.
>>
>> sed can be fixed without the use of tr by replacing '\n' with an explicit newline like:
>>
>> sed -e 's/deerit./&\
>> \
>> \
>> \
>> /' -e "s/locavit,/locavit;/" < new6.txt > new8.txt
>>
>> Of course it doesn't fit on one line though.
>
> I don't think replacing 2 lines with 10 is a big win (not counting a
> possible comment explaining why it's necessary). I'd rather replaced
> the thing with a Perl one-liner though, but that seems a bit frowned
> upon, correct?
Perl one-liner is Ok, so are pregenerated test vectors in separate
directory (i.e. ship with t/t6023/new6.txt file and refer to it from the
test as "$TEST_DIRECTORY/t6023/new6.txt"), but I think your original patch
to use % is perfectly fine for this one.
prev parent reply other threads:[~2008-09-08 19:27 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-08 18:29 [PATCH] t6023-merge-file: Work around non-portable sed usage Arjen Laarhoven
2008-09-08 19:06 ` Brandon Casey
2008-09-08 19:23 ` Arjen Laarhoven
2008-09-08 19:26 ` Junio C Hamano [this message]
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=7vej3ufnh3.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=arjen@yaph.org \
--cc=casey@nrlssc.navy.mil \
--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 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).