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

Re: [PATCH v2] name-rev: fix names by dropping taggerdate workaround

From
Elijah Newren <newren@gmail.com>
Date
Feb 8, 2023, 03:33 UTC
Message-ID
<CABPp-BHbqQtws3cg4-udC4XixeFk+BTp43xA48G-ok9tfcZcVg@mail.gmail.com>
In-Reply-To
<20230207193407.394971-1-calvinwan@google.com>
On Tue, Feb 7, 2023 at 11:34 AM Calvin Wan <calvinwan@google.com> wrote:
Show 7 quoted lines
>
> 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.

Show 14 quoted lines
> > 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.
Previous: Calvin WanNext: Elijah Newren via GitGitGadget
Message 4 of 6 in “name-rev: stop including taggerdate in naming of commits”
  1. name-rev: stop including taggerdate in naming of commitsElijah Newren via GitGitGadget, Jan 21, 2023
  2. name-rev: fix names by dropping taggerdate workaroundElijah Newren via GitGitGadget, Feb 7, 2023
  3. Calvin WanFeb 7, 2023
  4. Elijah NewrenFeb 8, 2023
  5. name-rev: fix names by dropping taggerdate workaroundElijah Newren via GitGitGadget, Feb 9, 2023
  6. Junio C HamanoFeb 9, 2023

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.