Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlo Marcelo Arenas Belón <carenas@gmail.com>2018-12-01 20:36:45 +0300
committerJunio C Hamano <gitster@pobox.com>2018-12-03 03:26:02 +0300
commit82cbc8cde25859027aa013568a7040b5a63707d2 (patch)
tree26b57125793d56548bfaf656ac49542314a5a550 /t/check-non-portable-shell.pl
parent8a0ba68f6dab2c8b1f297a0d46b710bb9af3237a (diff)
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/check-non-portable-shell.pl')
-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';