On Wed, Dec 11, 2019 at 02:07:45PM -0800, Junio C Hamano wrote: > Emily Shaffer <emilyshaffer@xxxxxxxxxx> writes: > > >> So, a Porcelain script cannot learn where the hook command comes > >> from, > > > > Not as I had envisioned. > > > >> or what the precedence order of each line of the output is? > >> > > > > They're printed in the order they should be executed; the explicit order > > isn't provided. > > > > > > I suppose I had considered really just the one use case listed in the > > commit message, especially since other inquiry into the hooks to be run > > can be done against the config files themselves. But - I'm of course > > open to use cases. What did you have in mind? > > A tool to diagnose why the hooks are not firing in the order the > user intended them to, for example? > > Or a tool to help editing the list of hooks. FWIW, the next step for this 'git hook' tool is just such a mode, although I certainly won't argue with anybody who wants to interact with them somewhat differently. Does allowing a format string solve this, then? Maybe it's less Git-idiomatic, but it seems to me to be a very explicit format contract that the scripter can write, and probably more useful than guessing what info one might want when scripting. It also doesn't paint us into a corner if we add other interesting info later. Unless you have a complaint about it, I'll try to add that kind of argument instead of --porcelain for this command. - Emily