Skip to content

Not sure if from, to in diff.FilePatch.Files() is reversed #1061

Answered by AriehSchneier
zregvart asked this question in Q&A
Discussion options

You must be logged in to vote

I think your lines 51 and 52 are incorrect/back to front. Patch gives you the patch from 1 commit to the next, so you want from the parent to the child, ie your code should look something like:

			parent := result(c.Parent(0))
			p := result(parent.Patch(c))

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@zregvart
Comment options

Answer selected by zregvart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants