aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2026-03-23 09:20:30 -0700
committerJunio C Hamano <gitster@pobox.com>2026-03-23 09:20:30 -0700
commit05f91df704b70fac4524e3a7ca992981dc1c1db8 (patch)
treece311695e8cc30bc03c235320bd46d0011dc5da8
parent859132edb924423b70f37dccc9caf9945c5316da (diff)
parentbe430f4eaa9fa32420778f322a6a1c0d6162fbce (diff)
downloadgit-05f91df704b70fac4524e3a7ca992981dc1c1db8.tar.xz
Merge branch 'jc/test-allow-sed-with-ere'
Adjust test-lint to allow "sed -E" to use ERE in the patterns. * jc/test-allow-sed-with-ere: t: allow use of "sed -E"
-rwxr-xr-xt/check-non-portable-shell.pl2
-rwxr-xr-xt/t6030-bisect-porcelain.sh2
2 files changed, 2 insertions, 2 deletions
diff --git a/t/check-non-portable-shell.pl b/t/check-non-portable-shell.pl
index 6ee7700eb4..18d944b810 100755
--- a/t/check-non-portable-shell.pl
+++ b/t/check-non-portable-shell.pl
@@ -36,7 +36,7 @@ while (<>) {
$_ = $line;
/\bcp\s+-a/ and err 'cp -a is not portable';
- /\bsed\s+-[^efn]\s+/ and err 'sed option not portable (use only -n, -e, -f)';
+ /\bsed\s+-[^Eefn]\s+/ and err 'sed option not portable (use only -E, -n, -e, -f)';
/\becho\s+-[neE]/ and err 'echo with option is not portable (use printf)';
/^\s*declare\s+/ and err 'arrays/declare not portable';
/^\s*[^#]\s*which\s/ and err 'which is not portable (use type)';
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
index cdc0270640..1ba9ca219e 100755
--- a/t/t6030-bisect-porcelain.sh
+++ b/t/t6030-bisect-porcelain.sh
@@ -402,7 +402,7 @@ test_expect_success 'git bisect run: negative exit code' "
git bisect good $HASH1 &&
git bisect bad $HASH4 &&
! git bisect run ./fail.sh 2>err &&
- sed -En 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\1 -1 \3/p' err >actual &&
+ sed -E -n 's/.*(bisect.*code) (-?[0-9]+) (from.*)/\1 -1 \3/p' err >actual &&
test_cmp expect actual
"