commit: prepare get_commit_buffer to handle any repo