contrib/git-prompt.sh: handle missing 'printf -v' more gracefully
authorBrandon Casey <drafnel@gmail.com>
Thu, 22 Aug 2013 01:39:03 +0000 (18:39 -0700)
committerJunio C Hamano <gitster@pobox.com>
Thu, 22 Aug 2013 16:50:16 +0000 (09:50 -0700)
Old Bash (3.0) which is distributed with RHEL 4.X and other ancient
platforms that are still in wide use, do not have a printf that
supports -v. Neither does Zsh (which is already handled in the code).

As suggested by Junio, let's test whether printf supports the -v
option and store the result. Then later, we can use it to
determine whether 'printf -v' can be used, or whether printf
must be called in a subshell.

Signed-off-by: Brandon Casey <drafnel@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
No differences found