git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, Calvin Wan <calvinwan@google.com>,
	Elijah Newren <newren@gmail.com>
Subject: Re: [PATCH v3] name-rev: fix names by dropping taggerdate workaround
Date: Thu, 09 Feb 2023 09:10:37 -0800	[thread overview]
Message-ID: <xmqqilgaojci.fsf@gitster.g> (raw)
In-Reply-To: <pull.1468.v3.git.1675933906906.gitgitgadget@gmail.com> (Elijah Newren via GitGitGadget's message of "Thu, 09 Feb 2023 09:11:46 +0000")

"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:

> -	/*
> -	 * When comparing names based on tags, prefer names
> -	 * based on the older tag, even if it is farther away.
> -	 */
> +	/* If both are tags, we prefer the nearer one. */
>  	if (from_tag && name->from_tag)
> -		return (name->taggerdate > taggerdate ||
> -			(name->taggerdate == taggerdate &&
> -			 name_distance > new_distance));
> +		return name_distance > new_distance;

OK.

> -	/*
> -	 * We know that at least one of them is a non-tag at this point.
> -	 * favor a tag over a non-tag.
> -	 */
> +	/* Favor a tag over a non-tag. */
>  	if (name->from_tag != from_tag)
>  		return from_tag;

The removed sentence is not something whose validity has changed due
to the code change.  We still know at this point one of from_tag or
name->from_tag is false, thanks to the previous check, whose
condition did not change (only what is returned when the condition
holds changed).  But it may be obvious to readers, so, ... OK.

      reply	other threads:[~2023-02-09 17:11 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
2023-02-09  9:11   ` [PATCH v3] " Elijah Newren via GitGitGadget
2023-02-09 17:10     ` Junio C Hamano [this message]

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=xmqqilgaojci.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=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.
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).