Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'tb/test-lint-sed-options'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 7 Feb 2019 06:05:24 +0000
(22:05 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 7 Feb 2019 06:05:24 +0000
(22:05 -0800)
The test lint learned to catch non-portable "sed" options.
* tb/test-lint-sed-options:
test-lint: only use only sed [-n] [-e command] [-f command_file]
1
2
t/check-non-portable-shell.pl
patch
|
diff1
|
diff2
|
blob
|
history
raw
|
combined
(merge:
ecbe1be
e62e225
)
diff --cc
t/check-non-portable-shell.pl
index 8037eef7777b4f65af44b3c8cc3e4b46d48259ae,f0edcf8eb0026dc7eab6dafe647bcb60cfbe4ec0..166d64d4a2f05e76f3966080f188b864bf6bf4bb
---
1
/
t/check-non-portable-shell.pl
---
2
/
t/check-non-portable-shell.pl
+++ b/
t/check-non-portable-shell.pl
@@@
-35,8
-35,7
+35,8
@@@
while (<>)
chomp;
}
- /\bsed\s+-i/ and err 'sed -i is not portable';
+ /\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)';
/\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)';