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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: add got patch subcommand
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Mon, 7 Mar 2022 22:11:37 +0100

Download raw body.

Thread
On Mon, Mar 07, 2022 at 09:27:28PM +0100, Omar Polo wrote:
> Hello,
> 
> some time ago stsp suggested that got should be able to apply diffs by
> itself.  Using the VCS to apply them allows in fact some nice
> comodities: for instance added and removed files are automatically
> tracked.
> 
> The rather long diff attached is just that.  It's a simple and (i think)
> straightforward implementation of patch(1) only integrated inside got.
> There's a new got-read-patch libexec helpers (which borrows some lines
> of code from Larry' patch, but it's mostly rewritten from scratch) that
> is used to parse the content of the diff, similarly to the others
> got-read-* helpers and under the same restrictions, and lib/patch.c that
> wraps it.

Thanks, this is great! A very good starting point.

I think you should go ahead and put these changes on the main branch.
They do not break the build and tests are passing. We do not lose anything
even if this feature gets shipped in an incomplete state, and you will be
able to make progress faster as people run into problems trying to use this.

You could then also respond to reviews of your initial diff here by sending
smaller diffs with fixes back to the list, which makes things easier for all
of us.