{"thread":{"id":"26064","subject":"[PATCH 14/14] t{3032,6038}-*.sh: Allow SED_BIN_OPT to override the -b sed option","startedAt":"2010-12-14T18:43:52Z","lastAt":"2010-12-16T20:15:42Z","messageCount":3,"participants":["Ramsay Jones","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":14},"messages":[{"id":"158076","messageId":"4D07BAE8.6070904@ramsay1.demon.co.uk","threadId":"26064","inReplyTo":null,"subject":"[PATCH 14/14] t{3032,6038}-*.sh: Allow SED_BIN_OPT to override the -b sed option","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2010-12-14T18:43:52Z","receivedAt":"2010-12-14T18:43:52Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\nSome older versions of sed (eg. v3.02) do not understand the -b\n(--binary) option. However, these versions of sed may have an\nequivalent option we can use to request binary mode processing\n(eg. -c or --nocr).\n\nSigned-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n---\n\nI nearly didn't send this patch, since my MinGW sed is somewhat old, and\nmost people would not have this problem. (Note I *think* I installed\nusing msysGit-fullinstall-1.6.4-preview20090729.exe)\nSo, feel free to drop this patch...\n\n t/t3032-merge-recursive-options.sh |    2 +-\n t/t6038-merge-text-auto.sh         |    2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/t3032-merge-recursive-options.sh b/t/t3032-merge-recursive-options.sh\nindex 29e049a..22d9988 100755\n--- a/t/t3032-merge-recursive-options.sh\n+++ b/t/t3032-merge-recursive-options.sh\n@@ -13,7 +13,7 @@ test_description='merge-recursive options\n \n . ./test-lib.sh\n \n-test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b\n+test_have_prereq SED_STRIPS_CR && SED_OPTIONS=${SED_BIN_OPT--b}\n test_have_prereq MINGW && export GREP_OPTIONS=-U\n \n test_expect_success 'setup' '\ndiff --git a/t/t6038-merge-text-auto.sh b/t/t6038-merge-text-auto.sh\nindex d9c2d38..4245d6e 100755\n--- a/t/t6038-merge-text-auto.sh\n+++ b/t/t6038-merge-text-auto.sh\n@@ -14,7 +14,7 @@ test_description='CRLF merge conflict across text=auto change\n \n . ./test-lib.sh\n \n-test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b\n+test_have_prereq SED_STRIPS_CR && SED_OPTIONS=${SED_BIN_OPT--b}\n \n test_expect_success setup '\n \tgit config core.autocrlf false &&\n-- \n1.7.3\n"},{"id":"158084","messageId":"7vlj3stamh.fsf@alter.siamese.dyndns.org","threadId":"26064","inReplyTo":"4D07BAE8.6070904@ramsay1.demon.co.uk","subject":"Re: [PATCH 14/14] t{3032,6038}-*.sh: Allow SED_BIN_OPT to override the -b sed option","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-12-14T19:31:02Z","receivedAt":"2010-12-14T19:31:02Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsay1.demon.co.uk> writes:\n\n> Some older versions of sed (eg. v3.02) do not understand the -b\n> (--binary) option. However, these versions of sed may have an\n> equivalent option we can use to request binary mode processing\n> (eg. -c or --nocr).\n>\n> Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk>\n> ---\n>\n> I nearly didn't send this patch, since my MinGW sed is somewhat old, and\n> most people would not have this problem. (Note I *think* I installed\n> using msysGit-fullinstall-1.6.4-preview20090729.exe)\n> So, feel free to drop this patch...\n>\n>  t/t3032-merge-recursive-options.sh |    2 +-\n>  t/t6038-merge-text-auto.sh         |    2 +-\n>  2 files changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git a/t/t3032-merge-recursive-options.sh b/t/t3032-merge-recursive-options.sh\n> index 29e049a..22d9988 100755\n> --- a/t/t3032-merge-recursive-options.sh\n> +++ b/t/t3032-merge-recursive-options.sh\n> @@ -13,7 +13,7 @@ test_description='merge-recursive options\n>  \n>  . ./test-lib.sh\n>  \n> -test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b\n> +test_have_prereq SED_STRIPS_CR && SED_OPTIONS=${SED_BIN_OPT--b}\n\nIt is unclear who is supposed to feed you SED_BIN_OPT.\n\nPerhaps a patch to add an insn like \"If you have an ancient sed, export\nSED_BIN_OPT=-c before running tests\" to t/README is also necessary to go\ntogether with this change.\n"},{"id":"158232","messageId":"4D0A736E.605@ramsay1.demon.co.uk","threadId":"26064","inReplyTo":"7vlj3stamh.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH 14/14] t{3032,6038}-*.sh: Allow SED_BIN_OPT to override the -b sed option","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsay1.demon.co.uk","sentAt":"2010-12-16T20:15:42Z","receivedAt":"2010-12-16T20:15:42Z","isPatch":true,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"Junio C Hamano wrote:\n>>  \n>> -test_have_prereq SED_STRIPS_CR && SED_OPTIONS=-b\n>> +test_have_prereq SED_STRIPS_CR && SED_OPTIONS=${SED_BIN_OPT--b}\n> \n> It is unclear who is supposed to feed you SED_BIN_OPT.\n> \n> Perhaps a patch to add an insn like \"If you have an ancient sed, export\n> SED_BIN_OPT=-c before running tests\" to t/README is also necessary to go\n> together with this change.\n\nYes, you are right. I had such a change to t/README but it was mixed in with\nanother patch to document other such variables which was incomplete. (see my\nprevious mail in response to your comments on patch 4/14).\n\nAlso, I was half expecting you to drop the patch, because I thought I was in\nthe minority with an old sed; however, it seems I'm not that unusual after\nall ... ;-)\n\nATB,\nRamsay Jones\n"}]}