git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] Replace in-place sed in t7502-commit

From
Marcel Koeppen <git-dev@marzelpan.de>
Date
May 16, 2008, 00:21 UTC
Message-ID
<1210897303-80828-1-git-send-email-git-dev@marzelpan.de>
In-Reply-To
<7vwslwgdyi.fsf@gitster.siamese.dyndns.org>

The in-place mode of sed used in t7502-commit is a non-POSIX extension. That call of sed is replaced by a more portable version using a temporary file.

Signed-off-by: Marcel Koeppen <git-dev@marzelpan.de>
---
 t/t7502-commit.sh |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/t/t7502-commit.sh b/t/t7502-commit.sh
index 018060c..3531a99 100755
--- a/t/t7502-commit.sh
+++ b/t/t7502-commit.sh
@@ -166,7 +166,9 @@ test_expect_success 'author different from committer' '
 	test_cmp expect actual
 '
 
-sed -i '$d' expect
+mv expect expect.tmp
+sed '$d' < expect.tmp > expect
+rm -f expect.tmp
 echo "# Committer:
 #" >> expect
 unset GIT_COMMITTER_EMAIL
-- 
1.5.5.1.215.g64c0d
Previous: Santi BéjarNext: Jeff King
Message 6 of 7 in “Fix sed syntax in t7502-commit for OSX”
  1. Fix sed syntax in t7502-commit for OSXMarcel Koeppen, May 15, 2008
  2. Junio C HamanoMay 15, 2008
  3. Holger SchurigMay 15, 2008
  4. Marcel KoeppenMay 15, 2008
  5. Santi BéjarMay 15, 2008
  6. Replace in-place sed in t7502-commitMarcel Koeppen, May 16, 2008
  7. Jeff KingMay 16, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.