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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got/cvg info: print work tree version
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Wed, 14 Aug 2024 15:02:32 +0200

Download raw body.

Thread
On Wed, Aug 14, 2024 at 02:51:44PM +0200, Omar Polo wrote:
> > [...]
> > --- lib/worktree_open.c
> > +++ lib/worktree_open.c
> > @@ -160,7 +160,7 @@ open_worktree(struct got_worktree **worktree, const ch
> >  		    "could not parse work tree format version number");
> >  		goto done;
> >  	}
> > -	if (version != GOT_WORKTREE_FORMAT_VERSION) {
> > +	if (version > GOT_WORKTREE_FORMAT_VERSION) {
> >  		err = got_error(GOT_ERR_WORKTREE_VERS);
> >  		goto done;
> >  	}
> 
> why changing this now?  we only have one version so far for the
> worktree, and we don't know what a v2 will be like (if we'll ever have
> to do it.)  maybe the files will have a different layout.
> 
> So, not really against it, but it seems a little strange to me to change
> this while adding the getter for the version.
> 

Fair enough, I've left this out for now. Committed the rest,
plus a tiny format string fix (%u vs %d).