git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Michael J Gruber <git@drmicha.warpmail.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH 1/2] git-describe: introduce --first-parent
Date: Tue, 11 Sep 2012 09:41:34 -0700	[thread overview]
Message-ID: <7voblcikap.fsf@alter.siamese.dyndns.org> (raw)
In-Reply-To: <b5a771de4f84b6f6ae82b736c834d105aa98f87f.1347370970.git.git@drmicha.warpmail.net> (Michael J. Gruber's message of "Tue, 11 Sep 2012 15:51:51 +0200")

Michael J Gruber <git@drmicha.warpmail.net> writes:

> so that git-describe searches first-parent history only when looking for

Please make sure your first paragraph of the log message start with
a full sentence, not an incomplete tail part of a sentence as if the
title of the commit were repeated in front of it.

> a named commit. This is useful for describing commits by tags on their
> "main" (first-parent) branch; for example, on git.git:

This is useful only when the history does not have fast-forward
merges from a sideline; otherwise it will produce unexpected
results, no?

> git describe 22ffc39
> v1.7.2.3-223-g22ffc39
>
> git describe --first-parent 22ffc39
> v1.7.2-104-g22ffc39

The output is wrong in that 22ffc39 is v1.7.2-336-g22ffc39, not 104.
Putting an arbitrary number that can change depending on how the
traversal went will close the door to possible follow-up work on the
recent sha1-name-more series (0958a24^2, most importantly aa1dec9e)
to prolong the shelf-life of describe output by filtering candidate
commits with reachability from the tag and the number of commits
from the tag.

In any case, it is not clear to me if this is a useful example to
help readers of this commit to understand why this new feature is
useful.  22ffc39 was created to mark that the work done for 1.7.2.x
maintenance track back then were all contained in the 'master' by
merging 'maint' when it was pointing at v1.7.2.3.  Saying the commit
is newer than v1.7.2.3 gives more information than it is newer than
v1.7.2, as by convention v1.7.2 must be older than v1.7.2.3, no?

  reply	other threads:[~2012-09-11 16:41 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-11 13:51 [PATCH 0/2] git describe --first-parent Michael J Gruber
2012-09-11 13:51 ` [PATCH 1/2] git-describe: introduce --first-parent Michael J Gruber
2012-09-11 16:41   ` Junio C Hamano [this message]
2012-09-11 13:51 ` [PATCH 2/2] describe: document and test --first-parent Michael J Gruber
2012-09-11 17:20   ` Junio C Hamano
2012-09-11 16:10 ` [PATCH 0/2] git describe --first-parent Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7voblcikap.fsf@alter.siamese.dyndns.org \
    --to=gitster@pobox.com \
    --cc=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).