Subject: Re: [PATCH v4 1/3] branch: avoid unnecessary worktrees traversals

From: Jonathan Tan <[email-masked]>
Date: Mon, 27 Feb 2023 11:30:12 -0800

Rubén Justo <[email-masked]> writes:
> Reviewing this, I noticed I made a mistake here.  The original code
> doesn't stop iterating whenever refs_create_symref() fails; it continues
> trying to update the remaining worktrees.  When the iteration ends, if
> any of the updates failed, then die().  Also, the error message "HEAD of
> working tree %s is not updated" is lost.  

Ah yes, I noticed this too.

Besides that, a reviewer, upon reading the commit message, might ask:
why not take the worktrees as a parameter then, if we're so worried
about performance? I think that the real reason for inlining is that the
code being inlined needs to communicate more information to its calling
function in subsequent patches; the performance improvement is only a
beneficial side effect.