{"thread":{"id":"65216","subject":"[RFC] t: allow use of \"sed -E\"","startedAt":"2026-03-11T21:35:44Z","lastAt":"2026-03-14T23:16:46Z","messageCount":9,"participants":["Junio C Hamano","Ramsay Jones","Patrick Steinhardt","brian m. carlson","Todd Zullinger"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"538682","messageId":"xmqq5x72m4lu.fsf@gitster.g","threadId":"65216","inReplyTo":null,"subject":"[RFC] t: allow use of \"sed -E\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-11T21:35:41Z","receivedAt":"2026-03-11T21:35:44Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Since early 2019 with e62e225f (test-lint: only use only sed [-n]\n[-e command] [-f command_file], 2019-01-20), we have been trying to\nlimit the options of \"sed\" we use in our tests to \"-e <pattern>\",\n\"-n\", and \"-f <file>\".\n\nBefore the commit, we were trying to reject only \"-i\" (which is one\nof the really-not-portable options), but the commit explicitly\nwanted to reject use of \"-E\" (use ERE instead of BRE).  The commit\ncites the then-current POSIX.1 (Issue 7, 2018 edition) to show that\n\"even recent POSIX does not have it!\", but the latest edition (Issue\n8) documents \"-E\" as an option to use ERE.\n\nBut that was 7 years ago, and that is a long time for many things to\nhappen.\n\nBesides, we have been using \"sed -E\" without the check in question\ntriggering in one of the scripts since 2022, with 461fec41 (bisect\nrun: keep some of the post-v2.30.0 output, 2022-11-10).  It was\nhidden because the 'E' was squished with another single letter\noption.\n\nt/t6030-bisect-porcelain.sh:\tsed -En 's/.*(bisect...\n\nThis escaped the rather simple pattern used in the checker\n\n    /\\bsed\\s+-[^efn]\\s+/ and err 'sed option not portable...';\n\nbecause -E did not appear as a singleton.\n\nLet's change the rule to allow the \"-E\" option, which nobody has\ncomplained against for the past 3 years.  We rewrite our first use\nof the \"-E\" option so that it is caught by the old rule, primarily\nbecause we do not want to teach our mischievous developers how to\nsmuggle in an unwated option undetected by the test lint.  And at\nthe same time, loosen the pattern to allow \"-E\" the same way we\nallow \"-n\" and friends.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n\n t/check-non-portable-shell.pl | 2 +-\n t/t6030-bisect-porcelain.sh   | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git c/t/check-non-portable-shell.pl w/t/check-non-portable-shell.pl\nindex 6ee7700eb4..dd8af6d08f 100755\n--- c/t/check-non-portable-shell.pl\n+++ w/t/check-non-portable-shell.pl\n@@ -36,7 +36,7 @@ sub err {\n \n \t$_ = $line;\n \t/\\bcp\\s+-a/ and err 'cp -a is not portable';\n-\t/\\bsed\\s+-[^efn]\\s+/ and err 'sed option not portable (use only -n, -e, -f)';\n+\t/\\bsed\\s+-[^Eefn]\\s+/ and err 'sed option not portable (use only -n, -e, -f)';\n \t/\\becho\\s+-[neE]/ and err 'echo with option is not portable (use printf)';\n \t/^\\s*declare\\s+/ and err 'arrays/declare not portable';\n \t/^\\s*[^#]\\s*which\\s/ and err 'which is not portable (use type)';\ndiff --git c/t/t6030-bisect-porcelain.sh w/t/t6030-bisect-porcelain.sh\nindex cdc0270640..1ba9ca219e 100755\n--- c/t/t6030-bisect-porcelain.sh\n+++ w/t/t6030-bisect-porcelain.sh\n@@ -402,7 +402,7 @@ test_expect_success 'git bisect run: negative exit code' \"\n \tgit bisect good $HASH1 &&\n \tgit bisect bad $HASH4 &&\n \t! git bisect run ./fail.sh 2>err &&\n-\tsed -En 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\\1 -1 \\3/p' err >actual &&\n+\tsed -E -n 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\\1 -1 \\3/p' err >actual &&\n \ttest_cmp expect actual\n \"\n \n\n\n"},{"id":"538684","messageId":"xmqq1phqm4ca.fsf@gitster.g","threadId":"65216","inReplyTo":"xmqq5x72m4lu.fsf@gitster.g","subject":"Re: [RFC] t: allow use of \"sed -E\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-11T21:41:25Z","receivedAt":"2026-03-11T21:41:28Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> Since early 2019 with e62e225f (test-lint: only use only sed [-n]\n> [-e command] [-f command_file], 2019-01-20), we have been trying to\n> limit the options of \"sed\" we use in our tests to \"-e <pattern>\",\n> \"-n\", and \"-f <file>\".\n>\n> Before the commit, we were trying to reject only \"-i\" (which is one\n> of the really-not-portable options), but the commit explicitly\n> wanted to reject use of \"-E\" (use ERE instead of BRE).  The commit\n> cites the then-current POSIX.1 (Issue 7, 2018 edition) to show that\n> \"even recent POSIX does not have it!\", but the latest edition (Issue\n> 8) documents \"-E\" as an option to use ERE.\n>\n> But that was 7 years ago, and that is a long time for many things to\n> happen.\n>\n> Besides, we have been using \"sed -E\" without the check in question\n> triggering in one of the scripts since 2022, with 461fec41 (bisect\n> run: keep some of the post-v2.30.0 output, 2022-11-10).  It was\n> hidden because the 'E' was squished with another single letter\n> option.\n>\n> t/t6030-bisect-porcelain.sh:\tsed -En 's/.*(bisect...\n>\n> This escaped the rather simple pattern used in the checker\n>\n>     /\\bsed\\s+-[^efn]\\s+/ and err 'sed option not portable...';\n>\n> because -E did not appear as a singleton.\n>\n> Let's change the rule to allow the \"-E\" option, which nobody has\n> complained against for the past 3 years.  We rewrite our first use\n> of the \"-E\" option so that it is caught by the old rule, primarily\n> because we do not want to teach our mischievous developers how to\n> smuggle in an unwated option undetected by the test lint.  And at\n\n\"unwated\" -> \"unwanted\", of course ;-)\n\n> the same time, loosen the pattern to allow \"-E\" the same way we\n> allow \"-n\" and friends.\n>\n> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n> ---\n>\n>  t/check-non-portable-shell.pl | 2 +-\n>  t/t6030-bisect-porcelain.sh   | 2 +-\n>  2 files changed, 2 insertions(+), 2 deletions(-)\n>\n> diff --git c/t/check-non-portable-shell.pl w/t/check-non-portable-shell.pl\n> index 6ee7700eb4..dd8af6d08f 100755\n> --- c/t/check-non-portable-shell.pl\n> +++ w/t/check-non-portable-shell.pl\n> @@ -36,7 +36,7 @@ sub err {\n>  \n>  \t$_ = $line;\n>  \t/\\bcp\\s+-a/ and err 'cp -a is not portable';\n> -\t/\\bsed\\s+-[^efn]\\s+/ and err 'sed option not portable (use only -n, -e, -f)';\n> +\t/\\bsed\\s+-[^Eefn]\\s+/ and err 'sed option not portable (use only -n, -e, -f)';\n>  \t/\\becho\\s+-[neE]/ and err 'echo with option is not portable (use printf)';\n>  \t/^\\s*declare\\s+/ and err 'arrays/declare not portable';\n>  \t/^\\s*[^#]\\s*which\\s/ and err 'which is not portable (use type)';\n> diff --git c/t/t6030-bisect-porcelain.sh w/t/t6030-bisect-porcelain.sh\n> index cdc0270640..1ba9ca219e 100755\n> --- c/t/t6030-bisect-porcelain.sh\n> +++ w/t/t6030-bisect-porcelain.sh\n> @@ -402,7 +402,7 @@ test_expect_success 'git bisect run: negative exit code' \"\n>  \tgit bisect good $HASH1 &&\n>  \tgit bisect bad $HASH4 &&\n>  \t! git bisect run ./fail.sh 2>err &&\n> -\tsed -En 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\\1 -1 \\3/p' err >actual &&\n> +\tsed -E -n 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\\1 -1 \\3/p' err >actual &&\n>  \ttest_cmp expect actual\n>  \"\n>  \n"},{"id":"538698","messageId":"77fce76d-07e2-4586-bb6c-f0043d171591@ramsayjones.plus.com","threadId":"65216","inReplyTo":"xmqq1phqm4ca.fsf@gitster.g","subject":"Re: [RFC] t: allow use of \"sed -E\"","fromName":"Ramsay Jones","fromEmail":"ramsay@ramsayjones.plus.com","sentAt":"2026-03-11T23:12:19Z","receivedAt":"2026-03-11T23:15:30Z","isPatch":false,"sender":{"key":"ramsay@ramsayjones.plus.com","avatar":"https://avatars.githubusercontent.com/u/33702710?v=4"},"body":"\n\nOn 11/03/2026 9:41 pm, Junio C Hamano wrote:\n> Junio C Hamano <gitster@pobox.com> writes:\n> \n[snip]\n>>\n>> Let's change the rule to allow the \"-E\" option, which nobody has\n>> complained against for the past 3 years.  We rewrite our first use\n>> of the \"-E\" option so that it is caught by the old rule, primarily\n>> because we do not want to teach our mischievous developers how to\n>> smuggle in an unwated option undetected by the test lint.  And at\n> \n> \"unwated\" -> \"unwanted\", of course ;-)\n> \n>> the same time, loosen the pattern to allow \"-E\" the same way we\n>> allow \"-n\" and friends.\n>>\n>> Signed-off-by: Junio C Hamano <gitster@pobox.com>\n>> ---\n>>\n>>  t/check-non-portable-shell.pl | 2 +-\n>>  t/t6030-bisect-porcelain.sh   | 2 +-\n>>  2 files changed, 2 insertions(+), 2 deletions(-)\n>>\n>> diff --git c/t/check-non-portable-shell.pl w/t/check-non-portable-shell.pl\n>> index 6ee7700eb4..dd8af6d08f 100755\n>> --- c/t/check-non-portable-shell.pl\n>> +++ w/t/check-non-portable-shell.pl\n>> @@ -36,7 +36,7 @@ sub err {\n>>  \n>>  \t$_ = $line;\n>>  \t/\\bcp\\s+-a/ and err 'cp -a is not portable';\n>> -\t/\\bsed\\s+-[^efn]\\s+/ and err 'sed option not portable (use only -n, -e, -f)';\n>> +\t/\\bsed\\s+-[^Eefn]\\s+/ and err 'sed option not portable (use only -n, -e, -f)';\n\n.. and, perhaps, add -E to the error message?\n\nATB,\nRamsay Jones\n\n>>  \t/\\becho\\s+-[neE]/ and err 'echo with option is not portable (use printf)';\n>>  \t/^\\s*declare\\s+/ and err 'arrays/declare not portable';\n>>  \t/^\\s*[^#]\\s*which\\s/ and err 'which is not portable (use type)';\n>> diff --git c/t/t6030-bisect-porcelain.sh w/t/t6030-bisect-porcelain.sh\n>> index cdc0270640..1ba9ca219e 100755\n>> --- c/t/t6030-bisect-porcelain.sh\n>> +++ w/t/t6030-bisect-porcelain.sh\n>> @@ -402,7 +402,7 @@ test_expect_success 'git bisect run: negative exit code' \"\n>>  \tgit bisect good $HASH1 &&\n>>  \tgit bisect bad $HASH4 &&\n>>  \t! git bisect run ./fail.sh 2>err &&\n>> -\tsed -En 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\\1 -1 \\3/p' err >actual &&\n>> +\tsed -E -n 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\\1 -1 \\3/p' err >actual &&\n>>  \ttest_cmp expect actual\n>>  \"\n>>  \n> \n\n"},{"id":"538703","messageId":"xmqq7brhlwdd.fsf@gitster.g","threadId":"65216","inReplyTo":"77fce76d-07e2-4586-bb6c-f0043d171591@ramsayjones.plus.com","subject":"Re: [RFC] t: allow use of \"sed -E\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-12T00:33:34Z","receivedAt":"2026-03-12T00:33:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Ramsay Jones <ramsay@ramsayjones.plus.com> writes:\n\n>>> -\t/\\bsed\\s+-[^efn]\\s+/ and err 'sed option not portable (use only -n, -e, -f)';\n>>> +\t/\\bsed\\s+-[^Eefn]\\s+/ and err 'sed option not portable (use only -n, -e, -f)';\n>\n> .. and, perhaps, add -E to the error message?\n\nYes, indeed.  Thanks.\n"},{"id":"538704","messageId":"xmqq3425lvtq.fsf@gitster.g","threadId":"65216","inReplyTo":"xmqq5x72m4lu.fsf@gitster.g","subject":"[PATCH v2] t: allow use of \"sed -E\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-12T00:45:21Z","receivedAt":"2026-03-12T00:45:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Since early 2019 with e62e225f (test-lint: only use only sed [-n]\n[-e command] [-f command_file], 2019-01-20), we have been trying to\nlimit the options of \"sed\" we use in our tests to \"-e <pattern>\",\n\"-n\", and \"-f <file>\".\n\nBefore the commit, we were trying to reject only \"-i\" (which is one\nof the really-not-portable options), but the commit explicitly\nwanted to reject use of \"-E\" (use ERE instead of BRE).  The commit\ncites the then-current POSIX.1 (Issue 7, 2018 edition) to show that\n\"even recent POSIX does not have it!\", but the latest edition (Issue\n8) documents \"-E\" as an option to use ERE.\n\nBut that was 7 years ago, and that is a long time for many things to\nhappen.\n\nBesides, we have been using \"sed -E\" without the check in question\ntriggering in one of the scripts since 2022, with 461fec41 (bisect\nrun: keep some of the post-v2.30.0 output, 2022-11-10).  It was\nhidden because the 'E' was squished with another single letter\noption.\n\nt/t6030-bisect-porcelain.sh:\tsed -En 's/.*(bisect...\n\nThis escaped the rather simple pattern used in the checker\n\n    /\\bsed\\s+-[^efn]\\s+/ and err 'sed option not portable...';\n\nbecause -E did not appear as a singleton.\n\nLet's change the rule to allow the \"-E\" option, which nobody has\ncomplained against for the past 3 years.  We rewrite our first use\nof the \"-E\" option so that it is caught by the old rule, primarily\nbecause we do not want to teach our mischievous developers how to\nsmuggle in an unwanted option undetected by the test lint.  And at\nthe same time, loosen the pattern to allow \"-E\" the same way we\nallow \"-n\" and friends.\n\nSigned-off-by: Junio C Hamano <gitster@pobox.com>\n---\n t/check-non-portable-shell.pl | 2 +-\n t/t6030-bisect-porcelain.sh   | 2 +-\n 2 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/t/check-non-portable-shell.pl b/t/check-non-portable-shell.pl\nindex 6ee7700eb4..18d944b810 100755\n--- a/t/check-non-portable-shell.pl\n+++ b/t/check-non-portable-shell.pl\n@@ -36,7 +36,7 @@ sub err {\n \n \t$_ = $line;\n \t/\\bcp\\s+-a/ and err 'cp -a is not portable';\n-\t/\\bsed\\s+-[^efn]\\s+/ and err 'sed option not portable (use only -n, -e, -f)';\n+\t/\\bsed\\s+-[^Eefn]\\s+/ and err 'sed option not portable (use only -E, -n, -e, -f)';\n \t/\\becho\\s+-[neE]/ and err 'echo with option is not portable (use printf)';\n \t/^\\s*declare\\s+/ and err 'arrays/declare not portable';\n \t/^\\s*[^#]\\s*which\\s/ and err 'which is not portable (use type)';\ndiff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh\nindex cdc0270640..1ba9ca219e 100755\n--- a/t/t6030-bisect-porcelain.sh\n+++ b/t/t6030-bisect-porcelain.sh\n@@ -402,7 +402,7 @@ test_expect_success 'git bisect run: negative exit code' \"\n \tgit bisect good $HASH1 &&\n \tgit bisect bad $HASH4 &&\n \t! git bisect run ./fail.sh 2>err &&\n-\tsed -En 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\\1 -1 \\3/p' err >actual &&\n+\tsed -E -n 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\\1 -1 \\3/p' err >actual &&\n \ttest_cmp expect actual\n \"\n \n\nRange-diff:\n1:  43a56fa521 ! 1:  be430f4eaa t: allow use of \"sed -E\"\n    @@ Commit message\n         complained against for the past 3 years.  We rewrite our first use\n         of the \"-E\" option so that it is caught by the old rule, primarily\n         because we do not want to teach our mischievous developers how to\n    -    smuggle in an unwated option undetected by the test lint.  And at\n    +    smuggle in an unwanted option undetected by the test lint.  And at\n         the same time, loosen the pattern to allow \"-E\" the same way we\n         allow \"-n\" and friends.\n     \n    @@ t/check-non-portable-shell.pl: sub err {\n      \t$_ = $line;\n      \t/\\bcp\\s+-a/ and err 'cp -a is not portable';\n     -\t/\\bsed\\s+-[^efn]\\s+/ and err 'sed option not portable (use only -n, -e, -f)';\n    -+\t/\\bsed\\s+-[^Eefn]\\s+/ and err 'sed option not portable (use only -n, -e, -f)';\n    ++\t/\\bsed\\s+-[^Eefn]\\s+/ and err 'sed option not portable (use only -E, -n, -e, -f)';\n      \t/\\becho\\s+-[neE]/ and err 'echo with option is not portable (use printf)';\n      \t/^\\s*declare\\s+/ and err 'arrays/declare not portable';\n      \t/^\\s*[^#]\\s*which\\s/ and err 'which is not portable (use type)';\n-- \n2.53.0-698-g1cc7e6b802\n\n"},{"id":"538721","messageId":"abJgGapdAIQXIsNy@pks.im","threadId":"65216","inReplyTo":"xmqq3425lvtq.fsf@gitster.g","subject":"Re: [PATCH v2] t: allow use of \"sed -E\"","fromName":"Patrick Steinhardt","fromEmail":"ps@pks.im","sentAt":"2026-03-12T06:41:37Z","receivedAt":"2026-03-12T06:41:48Z","isPatch":true,"sender":{"key":"ps@pks.im","avatar":"https://avatars.githubusercontent.com/u/4056630?v=4"},"body":"On Wed, Mar 11, 2026 at 05:45:21PM -0700, Junio C Hamano wrote:\n> Since early 2019 with e62e225f (test-lint: only use only sed [-n]\n> [-e command] [-f command_file], 2019-01-20), we have been trying to\n> limit the options of \"sed\" we use in our tests to \"-e <pattern>\",\n> \"-n\", and \"-f <file>\".\n> \n> Before the commit, we were trying to reject only \"-i\" (which is one\n> of the really-not-portable options), but the commit explicitly\n> wanted to reject use of \"-E\" (use ERE instead of BRE).  The commit\n> cites the then-current POSIX.1 (Issue 7, 2018 edition) to show that\n> \"even recent POSIX does not have it!\", but the latest edition (Issue\n> 8) documents \"-E\" as an option to use ERE.\n> \n> But that was 7 years ago, and that is a long time for many things to\n> happen.\n> \n> Besides, we have been using \"sed -E\" without the check in question\n> triggering in one of the scripts since 2022, with 461fec41 (bisect\n> run: keep some of the post-v2.30.0 output, 2022-11-10).  It was\n> hidden because the 'E' was squished with another single letter\n> option.\n> \n> t/t6030-bisect-porcelain.sh:\tsed -En 's/.*(bisect...\n> \n> This escaped the rather simple pattern used in the checker\n> \n>     /\\bsed\\s+-[^efn]\\s+/ and err 'sed option not portable...';\n> \n> because -E did not appear as a singleton.\n\nMakes me wonder whether we also want to harden this regex. But even if\nwe started to understand that multiple single-letter options can be\nsquished together it wouldn't be sufficient, as we don't know to process\nmultiple arugments, either. And I guess it doesn't make sense to grow a\nfull command line parser here.\n\n> Let's change the rule to allow the \"-E\" option, which nobody has\n> complained against for the past 3 years.  We rewrite our first use\n> of the \"-E\" option so that it is caught by the old rule, primarily\n> because we do not want to teach our mischievous developers how to\n> smuggle in an unwanted option undetected by the test lint.  And at\n> the same time, loosen the pattern to allow \"-E\" the same way we\n> allow \"-n\" and friends.\n\nFeels reasonable to me.\n\nPatrick\n"},{"id":"538736","messageId":"abKG1U3fVuNV1w_9@fruit.crustytoothpaste.net","threadId":"65216","inReplyTo":"xmqq3425lvtq.fsf@gitster.g","subject":"Re: [PATCH v2] t: allow use of \"sed -E\"","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2026-03-12T09:26:45Z","receivedAt":"2026-03-12T09:26:53Z","isPatch":true,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2026-03-12 at 00:45:21, Junio C Hamano wrote:\n> Since early 2019 with e62e225f (test-lint: only use only sed [-n]\n> [-e command] [-f command_file], 2019-01-20), we have been trying to\n> limit the options of \"sed\" we use in our tests to \"-e <pattern>\",\n> \"-n\", and \"-f <file>\".\n> \n> Before the commit, we were trying to reject only \"-i\" (which is one\n> of the really-not-portable options), but the commit explicitly\n> wanted to reject use of \"-E\" (use ERE instead of BRE).  The commit\n> cites the then-current POSIX.1 (Issue 7, 2018 edition) to show that\n> \"even recent POSIX does not have it!\", but the latest edition (Issue\n> 8) documents \"-E\" as an option to use ERE.\n> \n> But that was 7 years ago, and that is a long time for many things to\n> happen.\n\nI think this seems reasonable.  I know this works on both reasonably\nnew Linux machines and on macOS, and I did some spot checking with the\nFreeBSD manual page viewer[0] and it's present in the following:\n\n* at least FreeBSD 9.0 (current is 15.0)\n* at least NetBSD 7.0 (current is 10.1)\n* at least OpenBSD 6.0 (current is 7.8)\n* Ubuntu 18.04\n\nso this appears to be reasonably well supported across major open source\ndistributions.  The irony is that Linux is most likely the OS holding us\nback here, since older versions labeled this `-r` and the newer `-E`\nwasn't available in Ubuntu 16.04.  I myself only recently learned about\nthe fact that `-E` had been officially standardized, since I'd been\nusing `-r` for a long time.\n\nAnd, for the record, I agree with you that `-i` is totally non-portable\nbecause it _requires_ an argument on BSD sed and the argument is\noptional on GNU sed (and cannot be specified as '').  I have a testsuite\nat work where I gave up and just used `perl -i` instead.\n\n> Besides, we have been using \"sed -E\" without the check in question\n> triggering in one of the scripts since 2022, with 461fec41 (bisect\n> run: keep some of the post-v2.30.0 output, 2022-11-10).  It was\n> hidden because the 'E' was squished with another single letter\n> option.\n\nYes, I think if nobody has complained about it in three years, we should\nbe fine.\n\n[0] https://man.freebsd.org/cgi/man.cgi\n-- \nbrian m. carlson (they/them)\nToronto, Ontario, CA\n"},{"id":"538747","messageId":"xmqqtsuli2ni.fsf@gitster.g","threadId":"65216","inReplyTo":"abKG1U3fVuNV1w_9@fruit.crustytoothpaste.net","subject":"Re: [PATCH v2] t: allow use of \"sed -E\"","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-03-12T13:43:45Z","receivedAt":"2026-03-12T13:43:48Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"brian m. carlson\" <sandals@crustytoothpaste.net> writes:\n\n> Yes, I think if nobody has complained about it in three years, we should\n> be fine.\n\nThis actually started when I noticed a recent rewrite of a test that\nturned \"grep -E ... | sed -e ...\" into \"sed -E -e ...\" was flagged\nby the test-lint.\n\nIt is not a huge deal to rewrite the resulting sed script again to\nuse BRE instead of ERE and it may not be a bad idea doing so anyway\n(and rewrite the existing t6030).  That can be done independently.\n\n\n"},{"id":"538994","messageId":"abXsWp5gYbxdHbkz@teonanacatl.net","threadId":"65216","inReplyTo":"abKG1U3fVuNV1w_9@fruit.crustytoothpaste.net","subject":"Re: [PATCH v2] t: allow use of \"sed -E\"","fromName":"Todd Zullinger","fromEmail":"tmz@pobox.com","sentAt":"2026-03-14T23:16:42Z","receivedAt":"2026-03-14T23:16:46Z","isPatch":true,"sender":{"key":"tmz@pobox.com","avatar":"https://avatars.githubusercontent.com/u/806319?v=4"},"body":"brian m. carlson wrote:\n> so this appears to be reasonably well supported across major open source\n> distributions.  The irony is that Linux is most likely the OS holding us\n> back here, since older versions labeled this `-r` and the newer `-E`\n> wasn't available in Ubuntu 16.04.  I myself only recently learned about\n> the fact that `-E` had been officially standardized, since I'd been\n> using `-r` for a long time.\n\nIIRC, GNU sed supported -E for a very long time before it\nwas documented.  In a quick search, I see it added in v4.1a,\nin commit 3a8e165 (treat cygwin CR/LF correctly (and by\ndesign, not by chance), 2006-08-07).\n\nhttps://cgit.git.savannah.gnu.org/cgit/sed.git/diff/sed/sed.c?id=3a8e165\n\n-- \nTodd\n"}]}