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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got export? checkout -X?
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 26 Sep 2021 15:06:28 +0200

Download raw body.

Thread
On Sat, Sep 25, 2021 at 11:53:44PM +0200, Christian Weisgerber wrote:
> For checking Got on FreeBSD in between releases, I squeeze something
> like this into the port:
> 
> DISTFILES=
> do-extract:
>         @cd ${WRKDIR} && got checkout /home/naddy/got.git ${WRKSRC}
>         @cd ${WRKSRC} && got ref -d `got info | \
>             awk '/work tree UUID:/ { print "refs/got/worktree/base-" $$NF }'`
> 
> There is no "got export" command.  Okay, so I can just use checkout.
> But that adds a reference to the repository, and those pile up, and
> pointlessly for throw-away checkouts.  Which is why I have to resort
> to the above to delete them.
> 
> Should there be a "got export" (cf. "svn export")?
> Some sort of "got checkout -X" to get rid of the ref more easily?

The problem with checkout -X is that you need the work tree UUID in
order to delete the ref. So you would need to run this command inside
a work tree to get its UUID. Which is weird because checkout is
supposed to create a *new* work tree...

I think having 'got export' is a better solution if that helps you.
Subversion also has both checkout and export commands. So this is
a concept people should already be used to (unless you're used to
Mercurial where 'export' does something entirely different).