format-patch: document and test --reroll-count

Signed-off-by: Junio C Hamano <gitster@pobox.com>
format-patch: give --reroll-count a short synonym -v

Accept "-v" as a synonym to "--reroll-count", so that users can say
"git format-patch -v4 master", instead of having to fully spell it
out as "git format-patch --reroll-count=4 master".

As I do not think of a reason why users would want to tell the
command to be "verbose", I think this should be OK.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
Merge branch 'jc/format-patch-reroll' into pu

* jc/format-patch-reroll:
  format-patch: give --reroll-count a short synonym -v
  format-patch: document and test --reroll-count
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>
Merge branch 'tb/test-shell-lint' into pu

* tb/test-shell-lint:
  test: Add check-non-portable-shell.pl