All of lore.kernel.org
 help / color / mirror / Atom feed
From: Calvin Wan <calvinwan@google.com>
To: Elijah Newren via GitGitGadget <gitgitgadget@gmail.com>
Cc: Calvin Wan <calvinwan@google.com>,
	git@vger.kernel.org, Elijah Newren <newren@gmail.com>
Subject: Re: [PATCH v2] name-rev: fix names by dropping taggerdate workaround
Date: Tue,  7 Feb 2023 19:34:07 +0000	[thread overview]
Message-ID: <20230207193407.394971-1-calvinwan@google.com> (raw)
In-Reply-To: <pull.1468.v2.git.1675751527365.gitgitgadget@gmail.com>

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.

> 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.

-Calvin

  reply	other threads:[~2023-02-07 19: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 [this message]
2023-02-08  3:33     ` Elijah Newren
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

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

  git send-email \
    --in-reply-to=20230207193407.394971-1-calvinwan@google.com \
    --to=calvinwan@google.com \
    --cc=git@vger.kernel.org \
    --cc=gitgitgadget@gmail.com \
    --cc=newren@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.