diff options
author | Torsten Bögershausen <tboegi@web.de> | 2013-01-03 00:20:19 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-02 16:06:42 -0800 |
commit | c7ce70ace9794a8f0b4774d803536a7ecdf318de (patch) | |
tree | 984a46565e24ffc9f8ca12c83e31817077abbc0c /dir.c | |
parent | 5d417842efeafb6e109db7574196901c4e95d273 (diff) | |
download | git-c7ce70ace9794a8f0b4774d803536a7ecdf318de.tar.gz git-c7ce70ace9794a8f0b4774d803536a7ecdf318de.tar.xz |
test: Add check-non-portable-shell.pl
Add the perl script "check-non-portable-shell.pl" to detect
non-portable shell syntax.
"echo -n" is an example of a shell command working on Linux, but not
on Mac OS X.
These shell commands are checked and reported as error:
- "echo -n" (printf should be used)
- "sed -i" (GNUism; use a temp file instead)
- "declare" (bashism, often used with arrays)
- "which" (unreliable exit status and output; use type instead)
- "test a == b" (bashism for "test a = b")
"make test-lint-shell-syntax" can be used to run only the check.
Helped-By: Jeff King <peff@peff.net>
Signed-off-by: Torsten Bögershausen <tboegi@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'dir.c')
0 files changed, 0 insertions, 0 deletions