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

Re: [PATCH] blame.c: replace instance of !oidcmp for oideq

From
Derrick Stolee <stolee@gmail.com>
Date
Sep 8, 2020, 19:07 UTC
Message-ID
<ce94b41f-e829-d7ca-a5f5-e41748caea81@gmail.com>
In-Reply-To
<20200907171639.766547-1-eantoranz@gmail.com>
On 9/7/2020 1:16 PM, Edmundo Carmona Antoranz wrote:
> ---

Please include sign-off. I saw you reported your intention there in another message, but it's probably best to just send it again.

This message could also mention 14438c4 (introduce hasheq() and oideq(), 2018-08-28) which introduced oideq().

This use of !oidcmp() was introduced by 0906ac2b (blame: use changed-path Bloom filters, 2020-04-16). My bad. There is no good reason to introduce this use since it is well after the oideq() method was introduced.

Show 9 quoted lines
> @@ -1353,8 +1353,8 @@ static struct blame_origin *find_origin(struct repository *r,
>  	else {
>  		int compute_diff = 1;
>  		if (origin->commit->parents &&
> -		    !oidcmp(&parent->object.oid,
> -			    &origin->commit->parents->item->object.oid))
> +		    oideq(&parent->object.oid,
> +			  &origin->commit->parents->item->object.oid))
>  			compute_diff = maybe_changed_path(r, origin, bd);
The code itself looks correct.

Thanks, -Stolee

Previous: Edmundo Carmona AntoranzNext: Jeff King
Message 4 of 14 in “blame.c: replace instance of !oidcmp for oideq”
  1. blame.c: replace instance of !oidcmp for oideqEdmundo Carmona Antoranz, Sep 7, 2020
  2. Edmundo Carmona AntoranzSep 7, 2020
  3. Edmundo Carmona AntoranzSep 8, 2020
  4. Derrick StoleeSep 8, 2020
  5. Jeff KingSep 9, 2020
  6. Edmundo Carmona AntoranzSep 9, 2020
  7. Jeff SmithSep 9, 2020
  8. Jeff KingSep 9, 2020
  9. Jeff KingSep 9, 2020
  10. René ScharfeSep 9, 2020
  11. Jeff KingSep 9, 2020
  12. Junio C HamanoSep 9, 2020
  13. Junio C HamanoSep 9, 2020
  14. René ScharfeSep 9, 2020

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.