From: Michael Montalbo Date: Fri, 29 May 2026 00:55:35 GMT Subject: Re: [PATCH v2 3/4] diff: add long-running diff process via diff..process Message-ID: In-Reply-To: On Mon, May 25, 2026 at 7:26 PM Junio C Hamano wrote: > > "Michael Montalbo via GitGitGadget" writes: > > > Zero hunks with status=success means the tool considers the > > files equivalent. Git skips diff output for that file. > > Is "zero hunk" a common word or some random string you invented? If > the latter, which is I am assuming it to be, you should define what > it means at/before the first use. Here in the proposed log message, > and ... > > > > > Signed-off-by: Michael Montalbo > > --- > > Documentation/config/diff.adoc | 8 + > > Documentation/gitattributes.adoc | 40 ++++ > > Makefile | 1 + > > diff-process.c | 206 +++++++++++++++++++ > > diff-process.h | 28 +++ > > diff.c | 23 +++ > > t/.gitattributes | 1 + > > t/t4080-diff-process.sh | 338 +++++++++++++++++++++++++++++++ > > 8 files changed, 645 insertions(+) > > create mode 100644 diff-process.c > > create mode 100644 diff-process.h > > create mode 100755 t/t4080-diff-process.sh > > > > diff --git a/Documentation/config/diff.adoc b/Documentation/config/diff.adoc > > index 1135a62a0a..4ab5f60df6 100644 > > --- a/Documentation/config/diff.adoc > > +++ b/Documentation/config/diff.adoc > > @@ -218,6 +218,14 @@ endif::git-diff[] > > Set this option to `true` to make the diff driver cache the text > > conversion outputs. See linkgit:gitattributes[5] for details. > > > > +`diff..process`:: > > + The command to run as a long-running diff process. > > + The tool communicates via the pkt-line protocol and returns > > + hunks that are fed into Git's diff and blame pipelines. > > + If the tool returns zero hunks, the file is treated as > > + unchanged for both diff output and blame attribution. > > + See linkgit:gitattributes[5] for details. > > ... also here. > > I do not know if you mean "the tool returns no hunks" (there is no > "hunk " line passed > from the tool over the protocol) or "the tool returns zero-hunk" > (there is a special "zero-hunk" message to signal this particular > condition sent over the protocol), and this description does not > quite help disambiguating between the two. > > If the former, then avoid "zero hunks" as it sounds like a noun with > special meaning. Yes, we can say "tool returns one hunk", "tool > returns 31 hunks", etc., so "tool returns zero hunks" may logically > be correct, but "when the tool returns no hunks with status=success" > is much less confusing, I think. Yes, "zero hunks" was my own invention and I see why it's confusing. Will update the messaging to use "no hunks" instead and do a broader sweep of the documentation to clarify the protocol and expected tool behavior.