Download raw body.
diff vs. patch, path-prefix
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.
diff vs. patch, path-prefix