git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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?

Previous: Michael J GruberNext: Junio C Hamano
Message 5 of 6 in “git describe --first-parent”
  1. 0/2 git describe --first-parentMichael J Gruber, Sep 11, 2012
  2. 1/2 git-describe: introduce --first-parentMichael J Gruber, Sep 11, 2012
  3. Junio C HamanoSep 11, 2012
  4. 2/2 describe: document and test --first-parentMichael J Gruber, Sep 11, 2012
  5. Junio C HamanoSep 11, 2012
  6. Junio C HamanoSep 11, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.