From: Brandon Casey Date: Thu, 22 Aug 2013 01:39:03 +0000 (-0700) Subject: contrib/git-prompt.sh: handle missing 'printf -v' more gracefully X-Git-Tag: v1.8.4.1~7^2 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/a44aa6930c9f3ce914f135c00a62878f9027f583?hp=a44aa6930c9f3ce914f135c00a62878f9027f583 contrib/git-prompt.sh: handle missing 'printf -v' more gracefully 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 Signed-off-by: Junio C Hamano ---