From: Jonathan Tan Date: Tue, 20 Jun 2017 20:09:03 GMT Subject: Re: [PATCH 15/26] submodule.c: migrate diff output to use emit_diff_symbol Message-ID: <20170620130903.36b1e696@twelve2.svl.corp.google.com> In-Reply-To: <20170620024816.20021-16-sbeller@google.com> On Mon, 19 Jun 2017 19:48:05 -0700 Stefan Beller wrote: > As the submodule process is no longer attached to the same stdout as > the superprojects process, we need to pass coloring explicitly. I found this confusing - what difference does the stdout make? If they were the same stdout, one process could set a color for the other process to follow, but it wouldn't be able to affect color changes inside the output, right? > Remove the colors from the function signatures, as all the coloring > decisions will be made either inside the child process or the final > emit_diff_symbol. This seems to be of the same pattern as the others. I would write this as: Create diff_emit_submodule_.* functions that make its own coloring decisions and migrate submodule.c to use them. This centralizes diff output, including coloring information, in one file. or something like that.