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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: diff vs. patch, path-prefix
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Mon, 11 Apr 2022 18:29:42 +0200

Download raw body.

Thread
On Mon, Apr 11, 2022 at 04:07:32PM +0200, Christian Weisgerber wrote:
> Is it overly naive by me to expect got diff | got patch to work?
> 
> E.g.:
> $ cd /usr/src
> $ ssh host 'cd /usr/src && got diff master work' | got patch
> 
> That is fine of course.
> 
> However, when you check out subtrees, it breaks.
> 
> E.g.:
> $ cd sys        # previously checked out with -p sys
> $ ssh host 'cd sys && got diff master work' | got patch
> 
> Diff always produces full paths from the repository root.
> Patch tries to match paths against the work tree.
> Individually that makes sense, but the combination somehow feels
> inconsistent.
> 
> Hmm.

I believe we decided that got patch needs a -pN option argument
for this case to work as expected.