Re: [PATCH 3/7] strbuf: introduce strbuf_read_cmd helper
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Mar 22, 2015, 23:40 UTC
- Message-ID
- <xmqqiodsbnyi.fsf@gitster.dls.corp.google.com>
- In-Reply-To
- <xmqqwq28bq3e.fsf@gitster.dls.corp.google.com>
Junio C Hamano <gitster@pobox.com> writes:
Show 14 quoted lines
> Eric Sunshine <sunshine@sunshineco.com> 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.