Re: [PATCH 0/3] git for-each-ref: is-base atom and base branches
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 2, 2024, 16:55 UTC
- Message-ID
- <xmqqzfpudful.fsf@gitster.g>
- In-Reply-To
- <27f3de89-55b2-413d-b4b4-6b35f8c4bcc9@gmail.com>
Derrick Stolee <stolee@gmail.com> writes:
Show 22 quoted lines
> 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.txt > b/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.