summaryrefslogtreecommitdiff
path: root/t
diff options
context:
space:
mode:
authorLibravatar Carlo Marcelo Arenas Belón <carenas@gmail.com>2018-12-01 09:36:45 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2018-12-03 09:26:02 +0900
commit82cbc8cde25859027aa013568a7040b5a63707d2 (patch)
tree26b57125793d56548bfaf656ac49542314a5a550 /t
parentGit 2.20-rc2 (diff)
downloadtgif-82cbc8cde25859027aa013568a7040b5a63707d2.tar.xz
tests: add lint for non portable cp -a
cp -a, while a common flag isn't in POSIX and will therefore fail on systems that don't have GNUish tools (like OpenBSD, AIX or Solaris) Signed-off-by: Carlo Marcelo Arenas Belón <carenas@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't')
-rwxr-xr-xt/check-non-portable-shell.pl1
1 files changed, 1 insertions, 0 deletions
diff --git a/t/check-non-portable-shell.pl b/t/check-non-portable-shell.pl
index b45bdac688..8037eef777 100755
--- a/t/check-non-portable-shell.pl
+++ b/t/check-non-portable-shell.pl
@@ -35,6 +35,7 @@ while (<>) {
chomp;
}
+ /\bcp\s+-a/ and err 'cp -a is not portable';
/\bsed\s+-i/ and err 'sed -i is not portable';
/\becho\s+-[neE]/ and err 'echo with option is not portable (use printf)';
/^\s*declare\s+/ and err 'arrays/declare not portable';