Download raw body.
two small fixes for got patch
On Sat, Mar 12, 2022 at 10:35:44AM +0100, Omar Polo wrote: > Stefan Sperling <stsp@stsp.name> wrote: > > Why should differing paths be an error? > > because it seemed like the simplest way to deal with the rename case, > given also that the rest of got doesn't treat the rename specially. That might change eventually. Renames are difficult but need to be dealt with somehow. The current approach (do nothing) is simply the easiest to implement :) > It also makes the parsing a little bit harder, consider the case of a > diff generated after "git mv foo bar": > > | % git show 530e3dd > | diff --git a/foo b/bar > | similarity index 100% > | rename from foo > | rename to bar > You do not yet have to parse any of these headers. You could just treat them as noise, for now. Have you taken a look at Subversion's patch.c: choose_target_filename()? That seems to be what your code is trying do achieve? If not, am I just misunderstanding what problem you trying to solve?
two small fixes for got patch