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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Elijah Newren via GitGitGadget" <gitgitgadget@xxxxxxxxx> 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.



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux