<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Mar 13, 2021 at 1:01 AM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 3/12/21 2:15 PM, enh wrote:<br>
>     But could I get a second opinion on that since I obviously flubbed allowing this<br>
>     patch in last time? My blog suggests I was hip-deep in doing the first round of<br>
>     modern shell stuff.<br>
<br>
Which I was also doing when I got this email, and it was the end of a long day,<br>
and none of _my_ test cases ever hit this so I wanted to see if you had one that<br>
did. (That's why I wanted the second opinion.)<br>
<br>
>     > it seems from the history like the EXDEV assignment was for the later test of<br>
>     > `errno != EXDEV` and is really meant to be a "did we successfully move?". i<br>
>     > don't think that's still valid now the force/clobber code has been added?<br>
> <br>
>     I think the rest of it's ok?<br>
> <br>
> yeah, i _think_ so, but i worry that it's past the level of complexity that<br>
> humans can cope with. sure you don't just want an explicit `moved` boolean?<br>
<br>
I'll add a comment on why we're setting errno = EXDEV, and rename "rc" to... I<br>
dunno, "send"? (rc = 0 means "don't try to send this file to the destination<br>
anymore, whether by cp or mv" and it consistently means that through its<br>
lifetime. Splitting that role into two variables doesn't seem clearer to me?)<br></blockquote><div><br></div><div>yeah, i think the use of _just_ `rc` was okay too. it was really the "am i following `errno`, `rc`, or both here?" that was particularly confusing.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Rob<br>
</blockquote></div></div>