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

[PATCH 14/14] t{3032,6038}-*.sh: Allow SED_BIN_OPT to override the -b sed option

From
Ramsay Jones <ramsay@ramsay1.demon.co.uk>
Date
Dec 14, 2010, 18:43 UTC
Message-ID
<4D07BAE8.6070904@ramsay1.demon.co.uk>

Some older versions of sed (eg. v3.02) do not understand the -b (--binary) option. However, these versions of sed may have an equivalent option we can use to request binary mode processing (eg. -c or --nocr).

Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>
---

I nearly didn't send this patch, since my MinGW sed is somewhat old, and most people would not have this problem. (Note I *think* I installed using msysGit-fullinstall-1.6.4-preview20090729.exe) So, feel free to drop this patch...

 t/t3032-merge-recursive-options.sh |    2 +-
 t/t6038-merge-text-auto.sh         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/t/t3032-merge-recursive-options.sh b/t/t3032-merge-recursive-options.sh
index 29e049a..22d9988 100755
--- a/t/t3032-merge-recursive-options.sh
+++ b/t/t3032-merge-recursive-options.sh
@@ -13,7 +13,7 @@ test_description='merge-recursive options
 
 . ./test-lib.sh
 
-test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
+test_have_prereq SED_STRIPS_CR && SED_OPTIONS=${SED_BIN_OPT--b}
 test_have_prereq MINGW && export GREP_OPTIONS=-U
 
 test_expect_success 'setup' '
diff --git a/t/t6038-merge-text-auto.sh b/t/t6038-merge-text-auto.sh
index d9c2d38..4245d6e 100755
--- a/t/t6038-merge-text-auto.sh
+++ b/t/t6038-merge-text-auto.sh
@@ -14,7 +14,7 @@ test_description='CRLF merge conflict across text=auto change
 
 . ./test-lib.sh
 
-test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b
+test_have_prereq SED_STRIPS_CR && SED_OPTIONS=${SED_BIN_OPT--b}
 
 test_expect_success setup '
 	git config core.autocrlf false &&
-- 
1.7.3
Next: Junio C Hamano
Message 1 of 3 in “t{3032,6038}-*.sh: Allow SED_BIN_OPT to override the -b sed option”
  1. 14/14 t{3032,6038}-*.sh: Allow SED_BIN_OPT to override the -b sed optionRamsay Jones, Dec 14, 2010
  2. Junio C HamanoDec 14, 2010
  3. Ramsay JonesDec 16, 2010

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.