Subject: Re: [PATCH 3/7] strbuf: introduce strbuf_read_cmd helper

From: Junio C Hamano <[email-masked]>
Date: Sun, 22 Mar 2015 16:40:37 -0700

Junio C Hamano <[email-masked]> writes:

> Eric Sunshine <[email-masked]> writes:
>
>> It does feel like a layering violation. If moved to the run-command
>> API, it could given one of the following names or something better:
>>
>>     run_command_capture()
>>     capture_command()
>>     command_capture()
>>     run_command_with_output()
>>     capture_output()
>
> Sound like a good suggestion (but I haven't read the users of the
> proposed function, after doing which I might change my mind---I'll
> see).

Now I read the callers, it does look like this new function better
fits in the run-command suite, essentially allowing us to do what we
would do with $(cmd) or `cmd` in shell and Perl scripts, even though
I do not particularly agree with the phrase "layering violation" to
call its current placement.

Thanks.