fix bad git_buf handling