mirror of
https://github.com/git/git.git
synced 2026-03-13 18:33:25 +01:00
On Windows, vsnprintf returns -1 if the buffer is too small instead of the number of characters needed. This wrapper computes the needed buffer size by trying various sizes with exponential growth. A large growth factor is used so as only few trials are required if a really large result needs to be stored. Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>