All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michael J Gruber <git@drmicha.warpmail.net>
To: Joshua Shrader <jshrader83@gmail.com>
Cc: Johannes Sixt <j.sixt@viscovery.net>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: can git-describe learn first-parent behavior?
Date: Wed, 22 Sep 2010 08:52:43 +0200	[thread overview]
Message-ID: <4C99A7BB.50401@drmicha.warpmail.net> (raw)
In-Reply-To: <AANLkTinDYae7yxSaRKNwOvkRe3yQ2GCBT=tiXhDe7NVR@mail.gmail.com>

Joshua Shrader venit, vidit, dixit 21.09.2010 21:57:
> I think I need to apologize to the list.  I did not actually observe
> what I had stated in my original post.  Given the description (and my
> possibly naive understanding) of git-describe, I hypothesized that
> what I originally stated was possible. If git-describe is in fact
> implemented with a first-parent-like behavior, as some people believe
> to be true, then I believe it is working correctly - I've seen nothing
> to the contrary.  However, I do believe that the documentation is
> unclear if this is the case.  My interpretation of "depth," which I
> believe to be consistent with the graph-theoretical definition, does
> imply that what I stated could happen.

Josh, no need to apologize. You simply tried to understand "git
describe". The mere fact that a Git long time contributor (J6t) and an
occasional contributor (I) are discussing "git describe"'s behaviour
tells you that it can't be that easy ;)

The man page says "most recent tag", and that is true, but with a
definition of "most recent" that you wouldn't expect. The description
there under "Search Strategy" is wrong, and has been at least since
80dbae03. I'll try to come up with a better explanation fit for the man
page, possibly after writing some more tests.

The intended behaviour is explained really well in Shawn's commit
message for 80dbae03. And if you look at the algorithm you see that the
order of the parents (as stored in a merge commit), in particular
first-parent relationship plays no role at all. The algo takes all
parents and inserts them in date order into a list to be looped over
afterwards.

The more I understand the algo the more I realize that --first-parent is
useful and completely different, and that I can optimize more in my patch.

Cheers
Michael

  reply	other threads:[~2010-09-22  6:52 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-21  5:58 can git-describe learn first-parent behavior? Joshua Shrader
2010-09-21  9:34 ` Michael J Gruber
2010-09-21  9:35   ` [RFC PATCH] git-describe: introduce --first-parent Michael J Gruber
2010-09-21 10:03   ` can git-describe learn first-parent behavior? Johannes Sixt
2010-09-21 11:49     ` Michael J Gruber
2010-09-21 12:00       ` Johannes Sixt
2010-09-21 12:10         ` Michael J Gruber
2010-09-21 12:34           ` Johannes Sixt
2010-09-21 15:26             ` Michael J Gruber
2010-09-21 19:57               ` Joshua Shrader
2010-09-22  6:52                 ` Michael J Gruber [this message]
2010-09-22 17:45                   ` Joshua Shrader

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=4C99A7BB.50401@drmicha.warpmail.net \
    --to=git@drmicha.warpmail.net \
    --cc=git@vger.kernel.org \
    --cc=j.sixt@viscovery.net \
    --cc=jshrader83@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.