All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.keller@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Derrick Stolee <derrickstolee@github.com>,
	Jacob Keller <jacob.e.keller@intel.com>,
	Johannes Schindelin <johannes.schindelin@gmx.de>,
	Git mailing list <git@vger.kernel.org>
Subject: Re: [PATCH] name-rev: test showing failure with non-monotonic commit dates
Date: Sun, 27 Feb 2022 14:05:15 -0800	[thread overview]
Message-ID: <CA+P7+xoaHtHMxE_RVBRyhOqVfuP_1s+2NGpGDo_eKfb25_ty7g@mail.gmail.com> (raw)
In-Reply-To: <xmqq1r03zl9z.fsf@gitster.g>

On Tue, Feb 15, 2022 at 4:51 PM Junio C Hamano <gitster@pobox.com> wrote:
>
> In "name-rev [--tags] C", we look for a tag to use in describing the
> given commit C as an ancestry path starting at the tag T (e.g. T~4,
> T~2^2).  There can be multiple such tags (e.g. it is likely that a
> commit that is v1.0~2 is also reachable from tag v2.0, even though
> it would require more hops).  We try to and find a tag that gives
> the "simplest" path.  For that purpose, it is no use to consider any
> tag that is not a descendant of the given commit, because doing an
> ancestry traversal starting from such a tag will never reach the
> commit.  In a world where everybody's clock is in sync, if commit
> was made at time X, any tag that was made before time X will not be
> a descendant of the commit, so we do not add such a tag to the
> candidate pool.
>
> I think the idea of "cutoff" heuristic is exactly what generation
> numbers can improve, in an imperfect world where there are imperfect
> clocks.

Yep. I have a patch that will implement this behavior based on
Derrick's suggestion.

Thanks,
Jake

  reply	other threads:[~2022-02-27 22:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-14 21:01 [PATCH] name-rev: test showing failure with non-monotonic commit dates Jacob Keller
2022-02-14 21:50 ` Junio C Hamano
2022-02-14 22:07   ` Jacob Keller
2022-02-15 14:48     ` Derrick Stolee
2022-02-15 23:38       ` Keller, Jacob E
2022-02-16  0:51       ` Junio C Hamano
2022-02-27 22:05         ` Jacob Keller [this message]
2022-03-09 21:56   ` Johannes Schindelin
2022-02-15  7:15 ` Ævar Arnfjörð Bjarmason
2022-02-16  1:16   ` Keller, Jacob E

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=CA+P7+xoaHtHMxE_RVBRyhOqVfuP_1s+2NGpGDo_eKfb25_ty7g@mail.gmail.com \
    --to=jacob.keller@gmail.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=jacob.e.keller@intel.com \
    --cc=johannes.schindelin@gmx.de \
    /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.