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

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

From
Junio C Hamano <gitster@pobox.com>
Date
Feb 9, 2023, 17:10 UTC
Message-ID
<xmqqilgaojci.fsf@gitster.g>
In-Reply-To
<pull.1468.v3.git.1675933906906.gitgitgadget@gmail.com>
"Elijah Newren via GitGitGadget" <gitgitgadget@gmail.com> writes:
Show 10 quoted lines
> -	/*
> -	 * 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.
Show 7 quoted lines
> -	/*
> -	 * 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.

Previous: Elijah Newren via GitGitGadget
Message 6 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.