4 ms·
Git has an internal "strbuf" library https://github.com/git/git/blob/master/strbuf.h https://github.com/git/git/blob/master/strbuf.h
by LukeShu 7y ago
Git has an internal "strbuf" library https://github.com/git/git/blob/master/strbuf.h https://github.com/git/git/blob/master/strbuf.h
- masklinn 7y agoAlternatively it also uses snprintf, though as a small internal variant (xsnprintf) which literally kills the program if the destination buffer is too small: https://github.com/git/git/blob/master/wrapper.c#L636-L650 https://github.com/git/git/blob/master/wrapper.c#L636-L650