git_buf.size

size holds the size (in bytes) of the data that is actually used.

struct git_buf
size_t size;

Meta