Re: [PATCH 2/2] describe: document and test --first-parent
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 11, 2012, 17:20 UTC
- Message-ID
- <7vy5kgh3wy.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <a0f0cf4e9cf41577d01d728007250f78e18a9ac0.1347370970.git.git@drmicha.warpmail.net>
Michael J Gruber <git@drmicha.warpmail.net> writes:
Show 18 quoted lines
> Signed-off-by: Michael J Gruber <git@drmicha.warpmail.net> > --- > Documentation/git-describe.txt | 16 +++++++++++++++- > t/t6120-describe.sh | 7 +++++++ > 2 files changed, 22 insertions(+), 1 deletion(-) > > diff --git a/Documentation/git-describe.txt b/Documentation/git-describe.txt > index 72d6bb6..9fb5c84 100644 > --- a/Documentation/git-describe.txt > +++ b/Documentation/git-describe.txt > @@ -84,6 +84,10 @@ OPTIONS > Only consider tags matching the given pattern (can be used to avoid > leaking private tags made from the repository). > > +--first-parent:: > + Only consider tags which can be reached from '<committish>' by a first > + parent walk, i.e. only those which are not on side branches. > +
[PATCH 1/2] says:
git describe --contains --first-parent is forbidden because git name-rev
(which is called by that) favors first-parent transversal already,
although not strictly so.but the end-users won't read the log message, so something like that need to be here, I guess.
But if "name-rev" does more-or-less first-parent anyway, perhaps simply ignoring --first-parent when doing --contains may make more sense?