Download raw body.
diff vs. patch, path-prefix
Stefan Sperling <stsp@stsp.name> wrote: > 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. well, -pN is a workaround for sure, but i'd like to fix 'got patch' for the subtrees too. In theory, it's not hard: we already know if we're in a subtree and its path prefix; in practice tho I haven't found the time to do it yet! sorry
diff vs. patch, path-prefix