Re: [PATCHv3 2/2] submodule: port init from shell to C
- From
Stefan Beller <sbeller@google.com>
- Date
- Jan 20, 2016, 22:33 UTC
- Message-ID
- <CAGZ79kajF9zR_m0+hbvasf+rwQcuDeywCzmdjuT6C4M5MBvmUQ@mail.gmail.com>
- In-Reply-To
- <xmqq60yo55jh.fsf@gitster.mtv.corp.google.com>
On Wed, Jan 20, 2016 at 1:01 PM, Junio C Hamano <gitster@pobox.com> wrote:
Show 24 quoted lines
> Stefan Beller <sbeller@google.com> writes: > >> By having the `init` functionality in C, we can reference it easier >> from other parts in the code. >> >> Signed-off-by: Stefan Beller <sbeller@google.com> >> Signed-off-by: Junio C Hamano <gitster@pobox.com> >> --- > > How faithful a conversion is this aiming to be? For example, one > thing I noticed is that some messages that were originally given > with "say" and sent to the standard output, which is emitted to the > standard error with this rewrite. I didn't read both patches > carefully, so there may be other discrepancies I didn't spot. > > I think you would want to do this in three steps: > > - A faithful rewrite from shell to C; > > - s/printf/fprintf(stderr, / for some messages; and finally > > - Hiding of some messages under --quiet. > > in the above order.
"say" respects the setting of GIT_QUIET, which is usually set when --quiet is passed, so I think I want:
- A faithful rewrite from shell to C including messages respecting --quiet, such that the "say" behavior is kept.
- s/printf/fprintf(stderr, / for some messages
and then be done with it.
Thanks, Stefan
>