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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: change got_worktree_init, open_worktree to use fds
To:
Yang Zhong <yzhong@freebsdfoundation.org>
Cc:
gameoftrees@openbsd.org
Date:
Wed, 9 Dec 2020 21:48:49 +0100

Download raw body.

Thread
  • Christian Weisgerber:

    change got_worktree_init, open_worktree to use fds

  • On Wed, Dec 09, 2020 at 11:35:08AM -0800, Yang Zhong wrote:
    > Attached are the changes exactly as you've described. The amount of
    > code-changing required does decrease drastically if we move cap_enter()
    > after opening the repo and worktree. I suppose the 'secondary benefits'
    > of using fds are not relevant in got_worktree_init and _open's case, so
    > this is all agreeable to me.
    
    Thanks! OK stsp
    
    One very small thing (can be fixed later if you prefer):
    
    > +done:
    > +	if (relpath)
    > +		free(relpath);
    
    No need to check relpath for NULL because free(NULL) is just fine.
    
    
    
  • Christian Weisgerber:

    change got_worktree_init, open_worktree to use fds