git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Elijah Newren <newren@gmail.com>
To: Calvin Wan <calvinwan@google.com>
Cc: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>,
	git@vger.kernel.org
Subject: Re: [PATCH v2] name-rev: fix names by dropping taggerdate workaround
Date: Tue, 7 Feb 2023 19:33:45 -0800	[thread overview]
Message-ID: <CABPp-BHbqQtws3cg4-udC4XixeFk+BTp43xA48G-ok9tfcZcVg@mail.gmail.com> (raw)
In-Reply-To: <20230207193407.394971-1-calvinwan@google.com>

On Tue, Feb 7, 2023 at 11:34 AM Calvin Wan <calvinwan@google.com> wrote:
>
> Are there any cases where a taggerdate heuristic would be useful now?
> I'm having a hard time coming up with an example of such, so this
> change looks very reasonable to me. Even if there existed such a case,
> I would imagine it would be better solved using other heuristics rather
> than checking the taggerdate since that was a very loose heuristic to
> begin with.

I'm currently only aware of cases where the heuristic hurts and none
where it helps.  I know it historically helped, but that was just a
workaround to the algorithm being suboptimal.  Since the algorithm has
been fixed, I think the workaround can be shelved.

> > diff --git a/builtin/name-rev.c b/builtin/name-rev.c
> > index 15535e914a6..df50abcdeb9 100644
> > --- a/builtin/name-rev.c
> > +++ b/builtin/name-rev.c
> > @@ -113,9 +113,7 @@ static int is_better_name(struct rev_name *name,
> >        * based on the older tag, even if it is farther away.
> >        */
> >       if (from_tag && name->from_tag)
> > -             return (name->taggerdate > taggerdate ||
> > -                     (name->taggerdate == taggerdate &&
> > -                      name_distance > new_distance));
> > +             return name_distance > new_distance;
>
> Comment above this block should be updated to match the new logic.

Good catch; will fix.

  reply	other threads:[~2023-02-08  3:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-21  4:28 [PATCH] name-rev: stop including taggerdate in naming of commits Elijah Newren via GitGitGadget
2023-02-07  6:32 ` [PATCH v2] name-rev: fix names by dropping taggerdate workaround Elijah Newren via GitGitGadget
2023-02-07 19:34   ` Calvin Wan
2023-02-08  3:33     ` Elijah Newren [this message]
2023-02-09  9:11   ` [PATCH v3] " Elijah Newren via GitGitGadget
2023-02-09 17:10     ` 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

  List information: http://vger.kernel.org/majordomo-info.html

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

  git send-email \
    --in-reply-to=CABPp-BHbqQtws3cg4-udC4XixeFk+BTp43xA48G-ok9tfcZcVg@mail.gmail.com \
    --to=newren@gmail.com \
    --cc=calvinwan@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).