From: Jonathan Tan Date: Wed, 15 Nov 2017 01:44:58 GMT Subject: Re: [PATCHv4 6/7] builtin/describe.c: factor out describe_commit Message-ID: <20171114174458.48e345602d6cb3b2614941ef@google.com> In-Reply-To: <20171115003043.24080-7-sbeller@google.com> On Tue, 14 Nov 2017 16:30:42 -0800 Stefan Beller wrote: > In the next patch we'll learn how to describe more than just commits, > so factor out describing commits into its own function. That will make > the next patches easy as we still need to describe a commit as part of > describing blobs. > > While factoring out the functionality to describe_commit, make sure > that any output to stdout is put into a strbuf, which we can print > afterwards, using puts which also adds the line ending. I think the sentences here are a bit jumbled. The aim is to make the next patch easier (your 2nd sentence), and how we accomplish that is by factoring out the description of commits (1st sentence) *and* by outputting to a strbuf because we need to postprocess the output further when describing a commit as part of describing a blob (3rd sentence).