"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Martijn van Duren <openbsd+got@list.imperialat.at>
Subject:
Re: got branch -d doesn't remove empty parent directory in reference
To:
Stefan Sperling <stsp@stsp.name>
Cc:
Gameoftrees <gameoftrees@openbsd.org>
Date:
Thu, 17 Sep 2026 11:47:36 +0200

Download raw body.

Thread
Works for me. OK martijn@ fwiw

On 9/17/26 11:07, Stefan Sperling wrote:
> On Thu, Sep 17, 2026 at 10:57:21AM +0200, Martijn van Duren wrote:
>> Works for me.
>>
>> I am wondering why you add the ENOENT check? If the parent directory
>> doesn't exist, wouldn't that be a race against someone who doesn't
>> adhere to locking policy, or is there a genuine use-case where the
>> parent directory could vanish before we call rmdir(2)?
> 
> It's just to cover the race with other rmdir calls, e.g. if someone
> decides to run find -empty -delete on the repository or something
> stupid like that.
> 
> Generally, we are trying to avoid erroring out for reasons which
> we don't need to complain about. Assuming that's even possible with
> the long list of potential errno values of rmdir, and inconsistencies
> between operating system platforms.