From: Junio C Hamano <gitster@pobox.com>
To: Marcel Koeppen <git-dev@marzelpan.de>
Cc: git@vger.kernel.org, sbejar@gmail.com
Subject: Re: [PATCH] Fix sed syntax in t7502-commit for OSX
Date: Thu, 15 May 2008 01:37:41 -0700 [thread overview]
Message-ID: <7vwslwgdyi.fsf@gitster.siamese.dyndns.org> (raw)
In-Reply-To: <1210817948-72280-1-git-send-email-git-dev@marzelpan.de> (Marcel Koeppen's message of "Thu, 15 May 2008 04:19:08 +0200")
Marcel Koeppen <git-dev@marzelpan.de> writes:
> The OSX version of sed interprets the command as argument to the -i option.
>
> Signed-off-by: Marcel Koeppen <git-dev@marzelpan.de>
> ---
> t/t7502-commit.sh | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
> index 018060c..9a43104 100755
> --- a/t/t7502-commit.sh
> +++ b/t/t7502-commit.sh
> @@ -166,7 +166,7 @@ test_expect_success 'author different from committer' '
> test_cmp expect actual
> '
>
> -sed -i '$d' expect
> +sed -i -e '$d' expect
> echo "# Committer:
> #" >> expect
> unset GIT_COMMITTER_EMAIL
Two comments and a half.
This patch does not make things worse, so I do not have much against it.
However, "sed -i $cmd" is also used in templates/hooks--prepare-commit-msg
and you would want to fix it as well.
But more importantly, as we are serious about portability, we should not
be using "sed -i" which is not even in POSIX to begin with. Can we
rewrite these places without using the in-place extension?
next prev parent reply other threads:[~2008-05-15 8:38 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-05-15 2:19 [PATCH] Fix sed syntax in t7502-commit for OSX Marcel Koeppen
2008-05-15 8:37 ` Junio C Hamano [this message]
2008-05-15 8:58 ` Holger Schurig
2008-05-15 11:06 ` Marcel Koeppen
2008-05-15 9:37 ` Santi Béjar
2008-05-16 0:21 ` [PATCH] Replace in-place sed in t7502-commit Marcel Koeppen
2008-05-16 9:56 ` Jeff King
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=7vwslwgdyi.fsf@gitster.siamese.dyndns.org \
--to=gitster@pobox.com \
--cc=git-dev@marzelpan.de \
--cc=git@vger.kernel.org \
--cc=sbejar@gmail.com \
/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).