Re: [PATCH 0/3] git for-each-ref: is-base atom and base branches
From: Junio C Hamano <hidden>
Date: 2024-08-02 16:55:36
Derrick Stolee [off-list ref] writes:
quoted hunk
consider this documentation diff, and I look forward to other review comments that I can use to improve this series before sending v2.diff --git a/Documentation/git-for-each-ref.txtb/Documentation/git-for-each-ref.txt index c1dd12b93cf..5154ba3e2a7 100644--- a/Documentation/git-for-each-ref.txt +++ b/Documentation/git-for-each-ref.txt@@ -264,6 +264,16 @@ ahead-behind:<committish>:: commits ahead and behind, respectively, when comparing the output ref to the `<committish>` specified in the format. +is-base:<committish>:: + In at most one row, `(<committish>)` will appear to indicate the ref + that minimizes the number of commits in the first-parent history of + `<committish>` and not in the first-parent history of the ref. Ties + are broken by favoring the earliest ref in the list. Note that this + token will not appear if the first-parent history of `<committish>` + does not intersect the first-parent histories of the filtered refs. + This can be used as a heuristic to guess which of the filtered refs + was used as the base of the branch that produced `<committish>`. +
OK. Knowing what definition you used is crucial when reading the implementation, as we cannot tell what you wanted to implement without it ;-) Thanks.